Go Down

Topic: XCode <-> Arduino (Read 2093 times) previous topic - next topic


I still do not own the board, but my intention is
writing/reading Arduino data from a C++ (Carbon) program written
in XCode  on MAC OS X (Intel).
I suppose I need to use the serial communication, even if it's plugged into the USB.
Any suggestions, source code snippets?


Also, I have a more general doubt.... Once I dowloaded the program,
does the board loose it at power off?
Or does it remain written in its permanent memory?


Yes you will have to use serial port communication. The USB port on the Arduino board shows up as a virtual serial port on yur PC (Mac).

Yes the Arduino board will remember the program even after being powercycled. Your data stored in variables will be gone though.

For code examples, sorry i'm a PC guy :-)



Do you have any code snippets for a PC, Id like to write some C++ (using Dev-C++) but am not sure which library to use.  There are so many webpages showing different methods of serial communication that I am a bit confused.  Many of the programs that I have found are a bit too complex for my level of programming.  Right now I am considering using Python since it appears to be the simplest way to send/recieve data to the serial port.




you could check openFrameworks (http://openframeworks.cc/about). It's a nice collection of C++ libraries packaged together. The Xcode setup requires some steps to get it working, but it's well worth it. There is a serial class and it's quite easy to interface oF with Arduino:


I hope it helps,



Sorry, no C or C++ code here.

My only experience with interfacing Arduino with a PC program was written in VB . net and is of no use in a C or C++ context.



Thanks for the tips, that open framework site looks great, will have to test later this afternoon.  Ive been experimenting with Python too, its a pretty cool language, was able to send bytes to my arduino using only 3 lines of code!  

Thanks again!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131