Processing on Microcontrollers?(Teensy, Arduino, etc.)

Hi everyone.

I am pretty sure there is a similar question but I couldn’t find the answer I want. Sorry if this is redundant. (I am a noob, still learning)

My Question: Is there any way to run Processing on Microcontrollers?(Teensy, Arduino, etc.)

Seems like Processing only runs on Windows, Mac, and Linux. I was wondering if it is possible to run on microcontrollers like Arduino, without desktop. I saw a post someone exporting application and running on Raspberry Pi, but Raspi is not an option for me here, since it is not RTOS.

For better scope of my project,

Project: [Bluetooth Speaker] -> [ADC] -> [Teensy, FFT] -> [Processing] -> [LED Matrix]

My problem: I got the FFT data from microcontroller(Teensy), how do I use that data to drive LED matrix, but without computer. (It is an installation, so it needs to standalone without computer)

Any feedback or advice is welcomed. Thank you so much!

Processing runs on Pi, has its own section on website. Not what you want.

Seen this: https://processing.org/tutorials/electronics/ ?

In general

In general, Arduino comes with its own programming language, derived from processing. It has its own IDE from where you can upload to Arduino.

To download IDE, see https://www.arduino.cc/en/Main/Software

Superb documentation on this website and forum too.

So no need to use processing imho.

Chrisir

There is a statement about this here:

That states:

The Processing approach has also been applied to electronics through the Arduino and Wiring projects. Arduino uses a syntax inspired by that used with Processing, and continues to use a modified version of the Processing programming environment to make it easier for students to learn how to program robots and countless other electronics projects.

A related discussion:

:)

1 Like

Could you use a Raspberry Pi? I have 4 Pi in service, they don’t have a screens, they boot and auto-run the application. My newest Pi is a “2B” but now there’s a Pi Zero W for about £10 (incredible).

Processing(Java) normally requires a screen. There is a method to run without somewhere, I’ve never tried it.

Can you code your application in Javascript? You can run that on the Pi with Node.js and there’s a serial library to talk to the Arduino.

I haven’t used teensy boards directly before, but have read quite a bit about them. To my understanding you can run them just like an Arduino and you can control an LED matrix with an Arduino or Teensy directly. Like others have also pointed out, the syntax in the Arduino IDE is very similar to processing so learning to do this shouldn’t be too hard if you’re comfortable with processing.

Running lights while using a microcontroller is relatively simple, but the issue you’ll run into when using an Arduino in your case is handling sound.

Arduinos are great at lights and motors and even relatively decent with TFT screens, but sound is their short coming I’ve found. Even with a decent ADC they’re generally too slow to process large enough sound files fast enough for realtime use. Bluetooth is also a little tricky with Arduino. This is where a raspberry pi really shines and you can run them headless by setting up the program to start at boot in the rc.local file.

If you can figure out the bluetooth for the teensy though, the difference between most of the Arduino boards and the teensy is the teensy runs on an ARM 32 Cortex M4 which should be plenty fast at handling sound. I did a toy project with a TFT screen last year and the refresh rate for ATmega328P on the Arduino vs the ARM chip is like night and day.

Right now I’m playing with building some standalone synths and raspberry pi or teensy really are the best options I believe for handling digital sound at a microcontroller level.

Critter and Guitari are a really good reference too for seeing how a raspberry pi can be used headless in a professional product. There’s some nice interview videos with the makers if you do some digging :slight_smile:

2 Likes

@onionwasabi

Can you clarify this?

Is the Bluetooth Speaker the source of the sound?

What is the analog input to the ADC? I am assuming microphone.

:)