A library for connecting to your Galaxy's Edge Droid from Droid Depot.
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.
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!
Generated using TypeDoc