I am using OSX. I am trying to communicate to a Diecimila board over USB via a C serial code. (I am following the tutorial here: http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/.) I loaded the serial_read_blink code in the Arduino shell and ran it.
It appears I can only get the board to blink if I leave the Arduino shell program and its "serial console" view on. If I close the shell program or leave it open but don't have the serial console view on, the board will blink once no matter what number I send it over the C program.
Does anyone know how I can write a program to the board that receives serial without having to keep the serial console view open?
I also got something like that.
Im reading from the serial connection in c / obj-c (Mac OS X). The Arduino is running a counter, that just increases an integer and sends the value to tty.
I would expect the programm runnung if I close the serial connection (Arduino still connected to Power). But when I reconnect via serial, the integer again starts with 0, counting up, every time I reconnect.
What is going on there?
On the Mac and Linux, the same auto-reset that allows you to upload a sketch to a Diecimila without pressing the reset button also causes the board to reset when you open a serial connection to it. You can either leave the serial connection open all the time, or use a serial-to-net proxy (which in turn leaves the serial connection open), or connect to the board using a USB-to-serial adapter on pins 0 and 1.
Ok, thank you for that information
Thank you for the response. Just FYI, on mac and linux I now start Minicom in -o mode in a backgrounded terminal. This lets me run scripts like the todbot arudino-serial to send commands without resetting the board. If anyone has a better way I'd love to hear it.