Optimized comunication

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-08 13:33:31 +02:00
parent 1be6e359f3
commit 00372ea266
3 changed files with 10 additions and 4 deletions

View File

@ -1 +0,0 @@
https://arduino.stackexchange.com/questions/19002/use-unix-terminal-instead-of-the-monitor-on-arduino-ide

View File

@ -1,3 +0,0 @@
#!/bin/bash
stty -F /dev/ttyUSB0 cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts
screen /dev/ttyUSB0 9600

View File

@ -0,0 +1,10 @@
#!/bin/bash
DEVICE="/dev/ttyUSB0"
BAUT_RATE="9600"
echo "Setting up output device \"$DEVICE\" with baut rate $BAUT_RATE." &&
stty -F "$DEVICE" cs8 "$BAUT_RATE" ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts &&
echo "Start interactive session with screen. You can close this session via \"screen -X -S arduino quit\"." &&
gnome-terminal -- /bin/bash -c 'screen -S "arduino" "'$DEVICE'" "'$BAUT_RATE'";' &&
echo "To terminate screen type enter..." &&
read &&
screen -X -S arduino quit && exit 1