mcopy/cli/lib/arduino
sixteenmillimeter 7c61af7043 Added logging to the arduino module to list all connected devices. 2020-08-18 14:20:43 -04:00
..
Readme.md Move docs generation to host repo 2019-03-30 17:56:31 -04:00
index.js Added logging to the arduino module to list all connected devices. 2020-08-18 14:20:43 -04:00
index.js.map Added logging to the arduino module to list all connected devices. 2020-08-18 14:20:43 -04:00
package.json Make modules local because modules in /app directory are recompiled for electron. Throws error on load in node 10. 2019-02-24 08:32:16 -05:00

Readme.md

Arduino

Class representing the arduino communication features

Kind: global class

arduino.enumerate() ⇒ Promise

Enumerate all connected devices that might be Arduinos

Kind: instance method of Arduino
Returns: Promise - Resolves after enumerating

arduino.sendAsync(device, cmd) ⇒ Promise

Send a command to an Arduino using async/await

Kind: instance method of Arduino
Returns: Promise - Resolves after sending

Param Type Description
device string Arduino identifier
cmd string Single character command to send

arduino.writeAsync(device, str) ⇒ Promise

Send a string to an Arduino using async/await

Kind: instance method of Arduino
Returns: Promise - Resolves after sending

Param Type Description
device string Arduino identifier
str string String to send

arduino.openArduino(device) ⇒ Promise

Connect to an Arduino using async/await

Kind: instance method of Arduino
Returns: Promise - Resolves after opening

Param Type Description
device string Arduino identifier

arduino.closeArduino(device) ⇒ Promise

Close a connection to an Arduino using async/await

Kind: instance method of Arduino
Returns: Promise - Resolves after closing

Param Type Description
device string Arduino identifier