Program Arduino or Pi with Processing?

I had a question to continue this thread on the old forum: https://forum.processing.org/one/topic/program-arduino-with-processing.html

Still, after reading that, I have the same question as the OP. There’s lots of detail in there that doesn’t seem to address the original question, or makes it hard to understand, at least for me.

For example, I’d like to 1) Use Processing to develop a sketch on my Mac to control an addressable LED strip via an Arduino or Pi, then 2) after it works great, embed it into the Arduino or Pi to then have it run stand alone when the board/LED strip are plugged into their own power source (with a physical on/off switch, maybe, also maybe microphone input).

What best supports this? I’ve seen in the Processing for Pi site, I can use a Pi to program on, but certainly I’d faster learn/run things via my Mac during experimenting/creating. And, the Arduino IDE looks exactly like the Processing IDE, so to the ignorant (myself) it seems to imply I can use the Arduino IDE to run/upload a sketch to the board itself, and it will live and execute the Processing code there.

Given the example above, what should I choose? Arduino or Pi?

1 Like

An Arduino board is a microcontroller whereas a Raspberry Pi is a full single board computer usually running Linux.

A program written in Processing basically just a Java program that depends heavily on the Processing libraries whereas a program for the Arduino would generally be written in C and then compiled with an AVR specific compiler to produce a binary for the microcontroller.There is no practical way to run a Processing sketch on an Arduino. If you want to write a program for your arduino you as may as well just use the Arduino IDE.That is the Arduino IDE uses C and provides additional AVR specific libraries in C and then compiles for the arduino using avr-gcc.

If you could explain exactly what the end result will be a little better that would help in answering the question. It sort of sounds like you are talking about two separate pieces, a “background” or perhaps embedded program to drive an LED strip and a separate front end program to control the behavior of the other one.

EDIT: You may just want to go with the Pi since libraries exist to drive it’s GPIO from Python and other higher level languages. You could write code for that on the Mac, but you’d only be able to test it on the Pi since your Mac doesn’t have GPIO. Also, the Pi and Arduino likely do not have not equivalent capacity to drive an LED strip on the pins.

2 Likes