JSPM

dream-cheeky-driver-api

3.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q38489F
  • License MIT

Driver for Dream Cheeky Missile Launcher

Package Exports

  • dream-cheeky-driver-api
  • dream-cheeky-driver-api/main.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dream-cheeky-driver-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dream-cheeky-api

Nodejs API for controller dream cheeky missile launcher. This is a reinforcement of pathikrit's node-thunder-driver library, with some unexpected behaviours removed and extra features. Now supports Node v16.


Prerequisite

For module usb and linux: sudo apt-get install build-essential libudev-dev

Installation

  1. npm install dream-cheeky-driver
  2. In your js file, add var DCDriver = require('dream-cheeky-driver');

API

###DCDriver ####DCDriver.DEVICE_CONSTANTS Description:

A JS object containing constants for Dream Cheeky Thunder Launcher.

####DCDriver.turnOnDebugMode() Description:

Turn on debug mode (level 4) of USB.

####DCDriver.turnOffDebugMode() Description:

Turn off USB debug mode (ie. debug level 0).

####DCDriver.moveUp(durationMS) Description:

Move up for a period of time.

Parameters:

#####durationMS Type: Number

####DCDriver.moveDown(durationMS) Description:

Move down for a period of time.

Parameters:

#####durationMS Type: Number

####DCDriver.moveLeft(durationMS) Description:

Move left for a period of time.

Parameters:

#####durationMS Type: Number

####DCDriver.moveRight(durationMS) Description:

Move right for a period of time.

Parameters:

#####durationMS Type: Number

####DCDriver.stop()

Stop movement immediately.

Parameters:

####DCDriver.fire(numberOfShot)

Shoot for numberOfShot times consecutively.

Parameters:

#####numberOfShot Type: Number

Number of shots

####DCDriver.park()

Go back to a fixed default location (leftmost and bottommost position).

Parameters: