-
Notifications
You must be signed in to change notification settings - Fork 3
Arduino CLI Usage
Although still in beta, the Arduino command line interface can be used to replace the IDE.
This guide is for developers / advanced users.
Follow the instructions on the Arduino CLI GitHub repository for details on installation.
Make sure SAMD board profiles are installed (this step is not necessary if you've already setup Loom through the IDE).
arduino-cli core install adafruit:samd --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Replace "SomeSketch" below with your sketch name.
arduino-cli compile --fqbn adafruit:samd:adafruit_feather_m0 SomeSketch
arduino-cli board list
Replace "SomeSketch" below with your sketch name, and "/dev/cu.usbmodem14401" with your device's port.
arduino-cli upload -p /dev/cu.usbmodem14401 -t -v --fqbn adafruit:samd:adafruit_feather_m0 SomeSketch --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Sending a config to the device via Serial may look like:
Replace "/dev/cu.usbmodem14401" with your device's port.
cat config.txt > /dev/cu.usbmodem14101
cat JsonTest.json | jq --compact-output '.' | tr -d '\n' > /dev/cu.usbmodem14101
You can use whatever Serial viewer you want, including the Serial monitor of the Arduino IDE.
From the command line, one option is screen:
screen <port> <baud_rate>
e.g:
screen /dev/cu.usbmodem14101 115200
To exit the screen display, enter Ctrl+A, Ctrl+K, then y to confirm