This code for some reason only works when I have the serial monitor in the Arduino IDE open. If I exit the IDE it doesn't work...i see the RX light on the board light up, and the the LED on pin 13 lights up, and nothing.
Any ideas why this could be happening? I'm running on Mac OS X Snow Leopard.
I am guessing, but as now one else is helping, how about this:
I had problems with RESET-EN coming active. When I started my pc or VB ide, Arduino changed to programming state. But this was different in two pc's. Maybe this can happen with Macs too.
I had to cut the jumper in RESET-EN track. Now I cant program Arduino before I solder the jumper again, but now Arduino works with the program it has.
i've been busy for some time now with serial, ruby and arduino. i got it working, but there's a small problem it has a strange delay of about 2 seconds... so if you want to put pin 12 on for 3 secondes you should give a parameter of 5
i used the PhysicalPixel example (changed the output to 12)
ruby code:
require "serialport.so"
if ARGV.size < 1
STDERR.print <<EOF
1st_serial_port 2nd_delay_in_seconds #example: ruby serialH7.rb /dev/tty.usbserial-A6008i1S 5
EOF
exit(1)
end