Available messages to send
###waitForUnplug This will cause the system to watch the USB devices and report when it no longer sees a Pinoccio device connected.
Arguments:
- cancel - (Boolean) - On true this will cancel a previously running unplug loop.
- interval - (Number) - The number of milliseconds to wait between checks. This is REQUIRED and is suggested around 250 for responsiveness.
Response:
- unplugged - (Boolean) - Exists and is true if the device was detected unplugged.
- msg - (String) - Helpful message of what happened.
- error - (String) Exists only if an error occurs and provides some information as to why.
###fetchAndProgram This will fetch a hex program file from a remote site and flash it onto the connected board.
Arguments:
- url - (String) - url to download the hex program file from.
Response:
- error - (String) Exists only if an error occurs and provides some information as to why.
An empty response ({}) is returned on a success.
###detect Checks that a Pinoccio device is connected and verifies that we can communicate with it.
Arguments:
- timeout - (Number) - The number of milliseconds to wait in total before failing.
Response:
- found - (Boolean) - true if we can detect the device is connected to USB.
- isOn - (Boolean) - true if the device appears to be powered on and communication succeeds.
- version - (Static String) - Currently statically returns 1.0
- error - (String) Exists only if an error occurs and provides some information as to why.
###forget Resets the internal connected device to none.
###bitlash Runs the given bitlash command and returns a result.
Arguments:
- command - (String) - The bitlash command to run. This is trimmed of whitespace.
Response:
- result - (String) - The raw results of the bitlash command as a string.
- error - (String) Exists only if an error occurs and provides some information as to why.
###program This will flash a passed in program, prefer fetchAndProgram currently. ###close Currently a noop