Update Readme and app compile_mcu script

This commit is contained in:
coolneng 2019-11-29 20:13:27 +01:00
parent 670a8a3c86
commit 6250b49538
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 30 additions and 1 deletions

View File

@ -25,4 +25,24 @@
cat /dev/ttyACM0
#+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

9
compile_mcu.sh Executable file
View File

@ -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"