@bespoken-sdk/robot

Robot SDK

Usage no npm install needed!

<script type="module">
  import bespokenSdkRobot from 'https://cdn.skypack.dev/@bespoken-sdk/robot';
</script>

README

robot-sdk

Includes Common utilities for robots

GPIO Usage

Check the api docs

// Sets the value of the pin
// (pinNumber, <value>(0|1))
GPIO.write(1, 1)
    .then(() => {console.log("done")})
    .catch(() => {console.error("something went wrong")})
}) 

// Sets the mode of the pin
// (pinNumber, mode)
// <mode> options "in"|"out"|"pwm"|"clock"|"up"|"down"|"tri"
GPIO.mode(1, 'out')
    .then(() => {
        console.log('mode OUT')
    })
    .catch(() => {console.error("something went wrong")})

Publish Package

make sure you have logged in on github

npm publish