astromech
v1.0.0
Published
Droid Depot controller library
Downloads
1
Readme
astromech.js
A library for connecting to your Galaxy's Edge Droid from Droid Depot.
Features
- Cross-platform: works in the browser and NodeJS
- Directional controls
- Acceleration control
- Sound controls
Usage
Add the library to your dependencies:
yarn add astromech
Import it and connect to a Droid:
import { Droid } from 'astromech'
const droid = await Droid.connect()
await droid.moveForward(3)
setTimeout(() => droid.stop(), 2000)
To find out all the things you can do with your droid, read the documentation at https://tubbo.github.io/astromech/classes/Droid.html
Since this library is written in TypeScript, we publish type definitions alongside the code in our NPM package releases.
Development
To run tests:
yarn test
To run lint checks:
yarn lint
To run type checks:
yarn types
To format code:
yarn fmt
You can also try out a basic example by running:
yarn start
Make sure your droid is turned on, and your remote is not!