xod-arduino-builder
This package is a part of the XOD project.
The builder wraps Arduino IDE into nodejs
Promise
-based cli interface.
Prerequisites
- Arduino IDE must be installed;
- Arduino IDE executable must be callable;
- Arduino IDE
packages/
folder must be reachable.
Example
Start node
cli session:
node
Import the builder and set utility display function:
const xab = ;const $HOME = processenvHOME;const c = promise;
Set paths to Arduino IDE executable and packages:
;;
View the raw official Arduino package index:
;
View the processed package index optimized for pav
selection:
;const pav = package: 'arduino' architecture: 'avr' version: '1.6.16' ;
Install the selected pav
:
;
View the boards supported by the selected pav
:
;const pab = package: pavpackage architecture: pavarchitecture board: 'uno' ;
Compile the file
for the selected pab
:
const file = $HOME + '/programs/arduino-1.8.1/examples/01.Basics/Blink/Blink.ino';;
View the available serial port
s:
;const port = '/dev/ttyACM0';
Compile and upload the file
for the selected pab
at the specified port
:
;