Showing posts with label Xcode. Show all posts
Showing posts with label Xcode. Show all posts

Saturday, June 6, 2009

Xcode > Arduino?

After bookmarking melka's Xcode Arduino template the other night, it was funny to see it posted the next morning on the Make: blog-- all signs point to Xcode, so here I go. Not having experience with a full-featured IDE or "real" C++ development, it should be an interesting learning experience.

The first thing I had to do was get the latest Xcode, 3.1.2, a 995.9MB download-- I installed 3.0 a while ago, but it complained when I tried to open melka's template. Got it installed, then went through melka's README and... everything worked!

I screwed up the first run through by renaming and moving the project. On the second try, I copied the unzipped "Arduino Base Template" to my desktop as "ArduinoBaseTemplate" and everything worked with the new template in Library/.../Project Templates/Arduino.

All is not wine and roses, though-- a test sketch that worked fine in the Arduino IDE gives me a lot of errors in Xcode, all related to the order I'm declaring things-- I generally define functions after my setup() and loop() calls, but Xcode gives me "was not declared in this scope" errors for all of them. It seems I do need to learn the basics of C++ to get this working. How to get a crash course in this stuff? Google came up with "C++ Language Tutorial" so, more to read...