it should support any number of robots (I saw somewhere that MAC supports up to 6), but I tested it only on 1 SPRK+ robot
I developed it on MAC OSX, but should work on any platform with Node.js and BLE (Bluetooth Low Energy)
"noble": "git://github.com/jacobrosenthal/noble.git#highsierra", "noble": "https://github.com/Timeular/noble-mac.git",
- Install Node.js.
- Clone/Pull this project from github https://github.com/rvolkov/spheroc
- Run
npm installin project directory - Run
bower installin project directory - Set your web token crypto key into app/config.js (any string you only know)
- Set your admin logins/passwords into app/config.js
- Enable Bluetooth on your MAC
- Run
node discoverfrom the project directory, shake your robot to enable BLE, it will find all your SPRK+/BB8 robots and will create file sprkp.json, it is sniffing for a BLE devices for 20 seconds after that writes down all the detected SPRK+/BB8 devices into sprkp.json file and exits - To reset device to initial state run
node sleep, do it every time if you can't stop robot or spheroc is unable to detect robot (after robot will shut down exit from utility by Ctrl+C) - it will possibly reset all the detected robots, but I didn't check more than 1 - Run
nodemonto start project locally - Point browser to
http://127.0.0.1:3002 - Enter login/password from app/config.js to access
- Shake robot to connect to the Bluetooth
- If you can't connect, exit from web app, run
node sleep, exit from it, runnodemonagain - If you need to work with RESTbox-controller - set 'rbox_server' and 'rbox_secret' into rbox.js to match with RESTbox-controller host and configuration