0

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.

  • Sure, if you want to write software for the Mac to do stuff, yes. – Majenko Mar 18 '18 at 18:50
  • Majenko - good to know it’s possible. Can you provide more details? (Eg an example, documentation, etc) – Don P Mar 18 '18 at 19:07
  • 2
    You basically send information over the serial connection. There's millions of examples around. What you send and how you send it depends on what it is you are wanting to do. – Majenko Mar 18 '18 at 19:08
  • Got it - can you link me to an example / suggest something to google? Arduino to Mac have unrelated sites – Don P Mar 18 '18 at 19:09
  • 1
    You need to know two things: 1. how to deal with serial on the Arduino, and 2. how to program the Mac to work with serial. Neither is related to the other. Serial on the Arduino is the same for Windows, Mac, Android, Linux, BeOS, Unicos, QNX.... whatever. – Majenko Mar 18 '18 at 19:11
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.