Sphero API V2
Unofficial Sphero JS API for V2 Robots. This API will work with V2 robots like mini, mcqueen, r2d2, bolt. Basic movements operations are working. Sensor reading is experimental as we still need to interpret the data.
Supported Robots
- Mini
- R2D2
- Bolt
- Lighting McQueen
- BB9e
Contributors - Special Thanks!
TODO
Examples
Sphero Mini - Let the main LED blink in different colors
const Scanner Utils = ; const makeItBlink = async { const sphero = await Scanner; if !sphero return console; while true await sphero; await Utils; await sphero; await Utils; await sphero; await Utils; await sphero; await Utils; await sphero; await Utils; await sphero; await Utils; }; ;
Sphero Mini - Roll ahead for 2 seconds
const Scanner Utils = ; const makeItRoll = async { const sphero = await Scanner; if !sphero return console; const speed = 100; const headingInDegrees = 0; const timeToRollInMilliseconds = 2000; const flags = ; await sphero;}; ;