2019-11-17 17:03:26 +01:00
|
|
|
* Arduino Course
|
|
|
|
|
|
|
|
Code from Universidad de Granada's Arduino Course.
|
|
|
|
|
|
|
|
** Usage
|
|
|
|
|
2019-11-19 18:22:36 +01:00
|
|
|
If you want to use arduino-cli instead of the official Arduino IDE, you can use compile.sh to compile and upload the Sketch to the board.
|
|
|
|
|
2019-11-17 17:03:26 +01:00
|
|
|
For example:
|
|
|
|
|
|
|
|
#+BEGIN_SRC sh
|
|
|
|
arduino-cli sketch new Test
|
|
|
|
./compile.sh Test
|
|
|
|
#+END_SRC
|
2019-11-19 18:33:58 +01:00
|
|
|
|
|
|
|
If you want to see the output of the Serial port, you have to identify the device:
|
|
|
|
|
|
|
|
#+BEGIN_SRC sh
|
|
|
|
arduino-cli board list
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Then you can see the output of the device, let's assume that the device is /dev/ttyACM0:
|
|
|
|
|
|
|
|
#+BEGIN_SRC sh
|
|
|
|
cat /dev/ttyACM0
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
If you get a /Permission denied/, try running the command as a superuser (e.g. *sudo*)
|