Go Down

Topic: Serial communication with arduino from mac (Read 535 times) previous topic - next topic

bkcberry

I have a Mac running 10.8.2
I'm trying to use arduino-serial.c to send commands over USB to my arduino. I can use the serial monitor or screen to send commands without any problem. If the serial monitor ISN'T open, screen works, but the program from the link below DOESN'T work. I've seen people all over the internet with this problem, but i haven't been able to find a solution. Does anyone know how to resolve this?


Code: [Select]
http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/

billroy

It would be helpful to have some specific examples of commands that are failing.

See if it helps to use -d 2000 before you send anything to the arduino.  For the first two seconds after a reboot (which happens when you open the serial port) the arduino isn't listening because it's in the bootloader.

-br


bkcberry

Thank you!! That was exactly the problem. The dumb thing is I know that it reboots when a serial connection is opened, I just totally forgot about it! *head smack*

billroy

Glad it worked for you.

Good luck with your project.

-br

Go Up