Skip to content

Commit 904f2fd

Browse files
committed
...
1 parent 915b97e commit 904f2fd

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

arduino/Main/Main.ino

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
void setup() {
2+
Serial.begin(9600);
3+
}
4+
5+
int byte_value=0;
6+
7+
void loop() {
8+
if (Serial.available() > 0) {
9+
byte_value=Serial.read();
10+
Serial.println(byte_value, DEC);
11+
}
12+
Serial.write('_');
13+
delay(1000);
14+
}
15+

arduino/Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
default:
22
ac compile --fqbn arduino:avr:uno Main
3-
ac upload --fqbn arduino:avr:uno -p /dev/ttyACM0 Main
3+
ac upload --fqbn arduino:avr:uno -p /dev/ttyUSB0 Main
44

55
install:
66
curl -L -o site.html 'https://arduino.github.io/arduino-cli/0.35/installation/'
77
curl -L -O 'https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_ARM64.tar.gz'
8+
#curl -L -O 'https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz'
89
echo "tar cvfz that single executable into /usr/local/bin/ac manually"
910

1011
init:
@@ -14,5 +15,5 @@ init:
1415
ac core list
1516

1617
cat:
17-
stty -F /dev/ttyACM0 raw 9600
18-
cat /dev/ttyACM0
18+
stty -F /dev/ttyUSB0 raw 9600
19+
cat /dev/ttyUSB0

0 commit comments

Comments
 (0)