Update Readme and app compile_mcu script
This commit is contained in:
parent
670a8a3c86
commit
6250b49538
22
README.org
22
README.org
|
@ -25,4 +25,24 @@
|
||||||
cat /dev/ttyACM0
|
cat /dev/ttyACM0
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
If you get a /Permission denied/, try running the command as a superuser (e.g. *sudo*)
|
If you get a /Permission denied/, you have to add your user to the group of the serial port (in this case /dev/ttyACM0).
|
||||||
|
|
||||||
|
To check the group of the device:
|
||||||
|
|
||||||
|
#+BEGIN_SRC sh
|
||||||
|
ls -la /dev/ttyACM0
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Then add your user to the group (in this case the group is dialout and the user is user)
|
||||||
|
|
||||||
|
#+BEGIN_SRC sh
|
||||||
|
sudo usermod -aG dialout user
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** ESP8266
|
||||||
|
|
||||||
|
During the *Week 4*, we used the NodeMCU instead of the Arduino uno, in this case to compile and upload the sketch (in this case we'll use the sketch Test):
|
||||||
|
|
||||||
|
#+BEGIN_SRC sh
|
||||||
|
./compile_mcu.sh Test
|
||||||
|
#+END_SRC
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo "Usage: compile.sh <Project>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
project=$1
|
||||||
|
|
||||||
|
arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 "$project" && arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2 "$project"
|
Loading…
Reference in New Issue