rshell.utf2): https://micropython.org/download/RPI_PICO/.utf2 on the Pico USB drivershell with python -m pip install rshelldialout group with sudo usermod -a -G dialout $USERrshell, it will automatically connect to itrepl, you will see three right arrows “>>>”pyboardpyboard.py from https://raw.githubusercontent.com/micropython/micropython/master/tools/pyboard.pyboot.pypython3 pyboard.py --device /dev/ttyUSB0 -f cp :boot.py boot.pyConnecting... appears in the IDEArduino core for the ESP32: https://github.com/espressif/arduino-esp32
arduino-cli# for example with `nix-env`
nix-env -iA nixpkgs.arduino-cli
# we will need access to the `/dev/ttyACM0` as a simple user.
# another unelegant solution is to run all the commands as root.
# add the current user to the group "dialout"
sudo usermod -a -G dialout
# to ensure that your current shell is using the `dialout` group, you can use the command `id`.
# if you don't have the `dialout` group you can force reloading your shell by using `su - $USER`
# list the boards
arduino-cli board list
# this command should shows the correct tty (for example `/dev/ttyACM0`) and the "Fully Qualified Board Name" also known as `fqbn`
# install a library
arduino-cli lib install LIBRARY_NAME
# compile the sketch
arduino-cli compile --fqbn arduino:avr:uno sketch.ino
# upload the sketch
arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:uno sketch.ino
# other useful commands
arduino-cli config init # create a config file
arduino-cli core update-index # update the index
arduino-cli core install arduino:avr ## install arduino AVR family board
arduino-cli board listall # list supported board
arduino-cli board details -b arduino:avr:nano # show detail on this board (to find the correct option)
# command line completion
arduino-cli completion bash > arduino-cli.sh
mv arduino-cli.sh /etc/bash_completion.d/ # need root
When using the default arduino software, we have an integrated serial monitor. But here, we are using the CLI and de facto there are no GUI so we will use the useful screen command!
To do so, we need:
/dev/ttyACM0)Serial.begin(115200);)screen /dev/ttyACM0 115200
To leave the screen session we can use Ctrl+a then k (for kill), the screen should then ask a confirmation with y key