Nodejs API for controller dream cheeky missile launcher that works on windows.
This is a reinforcement of guillaumedelre's dream-cheeky-thunder-driver library, with adjustments to run on windows and improvements on led
and execute commands
features.
It should work on linux as well, since the kernel check is not necessary for the device.
npm install dream-cheeky-windows-driver
- In your js file, add
var DCDriver = require('dream-cheeky-windows-driver');
Description:
A JS object containing constants for Dream Cheeky Thunder Launcher.
Description:
Turn on debug mode (level 4) of USB.
Description:
Turn off USB debug mode (ie. debug level 0).
Description:
Move up for a period of time.
Parameters:
Type: Number
Duration of moving time in ms.
Type: Function()
A function to execute when the movement is done.
Description:
Move down for a period of time.
Parameters:
Type: Number
Duration of moving time in ms.
Type: Function()
A function to execute when the movement is done.
Description:
Move left for a period of time.
Parameters:
Type: Number
Duration of moving time in ms.
Type: Function()
A function to execute when the movement is done.
Description:
Move right for a period of time.
Parameters:
Type: Number
Duration of moving time in ms.
Type: Function()
A function to execute when the movement is done.
Stop movement immediately.
Parameters:
Type: Function()
A function to execute when the movement is stopped.
Shoot for numberOfShot
times consecutively.
Parameters:
Type: Number
Number of shots
Type: Function()
A function to execute when all the shooting is done (and when the target is utterly destroyed!).
Go back to a fixed default location (leftmost and bottommost position).
Parameters:
Type: Function()
A function to execute when all the movement is done.
NOT STABLE yet, will be improved.
Convenient method to specify a chain of commands
Parameters:
Type: String
Type: Function()
A function to execute when the chain of commands is done.
Activate the led on th device
Parameters:
Type: String
Type: Function()
A function to execute when done.