Giter VIP home page Giter VIP logo

robotcontrol's Introduction

RobotControl

A simple python library to control Dash and Dot robots from Wonder Workshop.

This python library has been developed by using the AdaFruit BlueFruit LE sniffer to capture communication between the iPad and the Robots.

It might contain errors or might not work anymore in future release of the robot firmware.

Using this library is at your own risk.

Usage: from robot import *

Create a robot object like: dash = robot('bluetooth adress from your robot')

Execute commands to the robot like: dash.command(arg1, arg2, arg..)

For debugging, show all sensor data with the command: displaySensorData(robot) #where robot is your robot object

Read sensor data like: value = dash.sensor

When finished use the command: dash.disconnect() Otherwise the gatttool keeps running in the background and you might not be able to connect anymore. If this happens you kan kill the gatttool with the commandline: killall gatttool

Supported commands:

  • connect()
  • disconnect()
  • reset()
  • playSound(const sound) sound is a sound from the list below
  • playBeep(int tone, int time in ms) can also be used without the tone and time
  • drive(int distance in mm, int time in ms)
  • setWheelSpeed(int speed, int turnspeed) speed is between -400 and 400 turnspeed is between -500 and 500
  • stopWheels()
  • turn(int degrees, int time in ms)
  • moveHeadY(int degrees) -7 < degrees > 22
  • moveHeadX(int degrees) -135 < degrees > 135
  • colorFront(int red, int green, int blue)
  • colorLeftEar(int red, int green, int blue)
  • colorRightEar(int red, int green, int blue)
  • colorAll(int redFront, int greenFront, int blueFront, int redLeft, int greenLeft, int blueLeft, int redRight, int greenRight, int blueRight)
  • topLight(bool on)
  • tailLight(bool on)
  • eyeLights(int intensity, 12bit integer) Each bit represents a led, bit0 is top led, bit1 is led right from top led (when facing the robot)

Available sensordata:

  • leftDistanceSensor (int)
  • rightDistanceSensor (int)
  • rearDistanceSensor (int)
  • button0 (bool)
  • button1 (bool)
  • button2 (bool)
  • button3 (bool)
  • tilt (int)
  • lean (int)
  • soundLevel (int)
  • clap (booL)
  • headX (int)
  • headY (int)
  • leftWheel (int)
  • rightWheel (int)
  • zRotationAcceleration (int)
  • deltaZRotationAcceleration (int)
  • deltaXRotationAcceleration (int)
  • deltaYRotationAcceleration (int)
  • zAcceleration (int) between -2040 and +2040
  • soundDirection (int)
  • leftSensorSeesDot (bool)
  • rightSensorSeesDot (bool)
  • unknown1 (int)

Sounds:

  • HI
  • HUH
  • UHOH
  • OKAY
  • SIGH
  • TADA
  • WEE
  • BYE
  • HORSE
  • CAT
  • DOG
  • DINOSAUR
  • LION
  • GOAT
  • CROCODILE
  • ELEPHANT
  • FIRESIREN
  • TRUCKHORN
  • CARENGINE
  • CARTIRESQUEEL
  • HELICOPTER
  • JETPLANE
  • BOAT
  • TRAIN
  • BEEPS
  • LASERS
  • GOBBLE
  • BUZZ
  • AYYAIYAI
  • SQUEEK
  • MYSOUND1
  • MYSOUND2
  • MYSOUND3
  • MYSOUND4
  • MYSOUND5

robotcontrol's People

Contributors

vdwel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.