cat /dev/ttyUSB0 > datafilegnumeric < datafile
Specifically: The arduino-0015 development application does not close orrelease /dev/ttyUSB0 on Linux systems completely. As a result, "cat /dev/ttyUSB0" fails if you have used the serial data display inthe Arduino development application.To re-capture the data use "screen"
screen /dev/ttyUSB0 // Kill screen with ^ak or control-a k
An alternate way to stop the screen program: Display the process table and killscreen using the PID in column two.
ps aux // see screen and SCREEN processes. Note PID in column 2kill 9264 9265 // screen is gone and "cat /dev/ttyUSB0" now works
Background about the environment for these commands. My Arduinohardware is an Arduino Mega that has a USB type B port built in. The programapplication uses serial data setup and printing straight out of the
. In the Arduino development environment, I cansee the data being printed by the Arduino board using the Serial Monitor button. This should work before you can get data from /dev/ttyUSB0. Thecomputer runs a mix of Ubuntu 7.10 and 8.04.Serial port code fragments:
End of note by Lee. Added 9-jun-2011 - by The Dare Guy (http://twitter.com/thedareguy ):
Simple communication using 'cu' in Linux(tested in Ubuntu 10.04 LTE)
Find what USB port uses Arduino when you plug it into your computer. It can be something like /ttyUSBx or /ttyACMx (this is my case). To find the answerunplug the Arduino from the USB, run a Terminal (Applications > Accesories> Terminal) and type:
$ cd /dev$ ls tty*...tty8tty9
7/9/2011 Arduino playground - LinuxTTYarduino.cc/playground/…/LinuxTTY 3/4