Pages: [1]   Go Down
Author Topic: Serial communication with arduino from mac  (Read 392 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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*
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Glad it worked for you.

Good luck with your project.

-br
Logged

Pages: [1]   Go Up
Jump to: