user44866: I understand that each model of Arduino has limited cpu, ram, etc.
However, I have this very powerful Mac that it’s hooked up to.
Am i able to use my Mac for expensive computation and just pass results to my arduino in real-time?
Basically arduino takes in sensor data - passes it to Mac. Mac computes and returns an output to arduino.

user313: This blog describes the author's open-source, cross-platform library in C to talk to an Arduino via serial. The library is available on GitHub. A C project on your Mac can use it to communicate with your Arduino. You'll probably want to create a simple command protocol to keep the two in sync, as serial is pretty "barefoot" by itself, being just a stream of bytes with no markers, packets, or check-sums unless you impose such structures on your data, yourself. It probably doesn't need to be very complex, depending what your application needs.
I have found similar projects in Python and in Java for the Mac/Windows/Linux/<whatever> side; there's plenty of work already done for you.

44866: <p>I understand that each model of Arduino has limited cpu, ram, etc.</p>

<p>However, I have this very powerful Mac that it’s hooked up to.</p>

<p>Am i able to use my Mac for expensive computation and just pass results to my arduino in real-time?</p>

<p>Basically arduino takes in sensor data - passes it to Mac. Mac computes and returns an output to arduino.</p>
 313: <p><a href="http://todbot.com/blog/2013/04/29/arduino-serial-updated/" rel="nofollow noreferrer">This blog</a> describes the author's open-source, cross-platform library in C to talk to an Arduino via serial. The library is available on <a href="https://github.com/todbot/arduino-serial/" rel="nofollow noreferrer">GitHub</a>. A C project on your Mac can use it to communicate with your Arduino. You'll probably want to create a simple command protocol to keep the two in sync, as serial is pretty "barefoot" by itself, being just a stream of bytes with no markers, packets, or check-sums unless you impose such structures on your data, yourself. It probably doesn't need to be very complex, depending what your application needs.</p>

<p>I have found similar projects in Python and in Java for the Mac/Windows/Linux/&lt;whatever&gt; side; there's plenty of work already done for you.</p>
