I'm had an idea for a crossword puzzle program and was wondering if the code could also be compiled and run on a Mac. Has anyone ever used code written for an Arduino on a Mac?
I often develop the logic of a program destined for a small processor by simulating it on
the big rig my desktop machine.
I don't use Xcode, but that would work. I just use command line programming using the Terminal or, lately, on line C/C++ interpreters, google yourself a number of them, I use
which runs very well and affords storage for your programs. Free, it works, I find all kindsa stupid issues before code ever goes down to the micro.
If you keep the hardware specific code separate from the logic you can realize the goal of running "the same" program on two entirely different platforms.
For many Arduino programs there isn't much of significance that's not hardware specific.
But a chess program or crossword puzzle solver or whatever might have a substantial "engine" component that can be treated entirely abstractly.
Of course you must limit your expectations to what the Arduino hardware can deliver. Just mind the RAM and ROM and speed and be prepared.
big rig desktop machine, you can go further and provide scaffolding to make simulation more comprehensive. There was recent traffic on this foru m about some people's' efforts. I have never been able to find a thread after it goes past page N, so sorry good luck finding it. But simple enough ideas.
Debugging/developing anything non-trivial logic-wise this way is much less painful I assure you.
Oh wow, that thing compiles online, like a Tinkercad or similar. will it leave you with a module you can run later?