]> git.piffa.net Git - arduino/blob - serial-linux
kit30
[arduino] / serial-linux
1 Read Serial with linux:
2 https://wiki.archlinux.org/index.php/arduino#Accessing_serial
3 Note: As autoreset on serial connection is activated by default on most boards, you need to disable this feature if you want to communicate directly with your board with the last command instead of a terminal emulator (arduino IDE, screen, picocom...). If you have a Leonardo board, you are not concerned by this, because it does not autoreset. If you have a Uno board, connect a 10 µF capacitor between the RESET and GND pins. If you have another board, connect a 120 ohms resistor between the RESET and 5V pins.
4
5 stty -F /dev/ttyACM0 cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts
6
7
8 Oppure dopo il stty fare un 
9 cat </dev/ttyACM0
10
11 per redirigere su un file:
12  cat </dev/ttyACM0 > prova
13
14
15  sul quale si puo' fare un tail -f
16  ----------
17  attaching to a serial tty
18      In GNU Screen, you can connect to a serial device (screen -r /dev/ttyS0 115200). Tmux does not support this feature. 
19
20 si puo' anche usare screen:
21
22 screen /dev/ttyACM0 9600
23
24 Magic codes are [CTR]A -- d n a "
25
26 -----
27 See also http://playground.arduino.cc/Interfacing/LinuxTTY
28