Anki Overdrive SDK using Node and BTLE
This emulates much of what can be found in the default Anki Drive SDK:
http://developer.anki.com/drive-sdk/
This example shows similar capabilities using NodeJS.
Full documentation can be found in the apidoc/index.html; which is automatically served by the nodeJS server at '/'.
Here is a basic list of capabilities:
COMMUNICATIONS
- batteryLevel
- connect
- disconnect
- getDevices
- ping
- rescan
- turnOnLogging
- changeLanes
- setLaneOffset
- setSpeed
- trackCountTravel
- flashTaillights
- setEngineLight
- turnOffHeadlights
- turnOffTaillights
- turnOnHeadlights
- turnOnTaillights
- getTrackMap
- getTrackMapData
- mapTrack
I was only able to sort out the track IDs for my kit. I have a few other kits on order and will update the track IDs as best I can. Please let me know if you are able to tell me additional track IDs and what type of track it is (straight/curve/start).
The lights APIs were not easy to figure out. I believe they changed quite a bit in the Overdrive version and the public SDK does not address the changes yet. I did my best to handle a few cases. If you sort out others, let me know.
I began to work on being able to build a map of the track, but this is not yet complete. My thinking was to expose two services:
/mapTrack/:carname - This would drive the given car at a slow pace (300) and capture each track ID from start to finish building a track map array.
/getMap - Get the resulting map array which could be used to generate an image.
/getMapImage - Perhaps auto generate a png/gif of the track. TBD