FINALLY, I been working on this for a while.
I been trying to get Linux to talk to arduino via serial port.
Basically the read is what I am trying to do.
The huge breakthrough was finding a someone that did the source code in C:
Found it here
http://todbot.com/blog/2013/04/29/arduino-serial-updated/
You can download the source with git using the following command
git clone https://github.com/todbot/arduino-serial/
Then go into arduino-serial and run make
Then you got arduino-serial to play with
Here is how I used it in a bash script
#!/bin/bash COUNTER=1 while [ $COUNTER -eq 1 ]; do SERIALCOMMAND=`/home/larry/bin/arduino-serial -b 115200 -p /dev/ttyUSB0 -r | dos2unix | grep "read string" | cut -d\: -f2` echo "$SERIALCOMMAND" if [ "$SERIALCOMMAND" == "TV" ]; then COUNTER=0 fi echo $COUNTER done
Note the dos2unix command. It was the cause of major frustration for my script cause of the hidden strings.
Its all good though, it works, now I can run read values into bash on my Linux box.
Triumph
Earned right to be lazy doing pushups and situps then bed.