cnlohr / colorchord

Chromatic Sound to Light Conversion System
Other
673 stars 116 forks source link

Attempting to port to Arduino-ESP32 - how to pass audio data and output with FastLED #100

Open ohnoitsalobo opened 4 years ago

ohnoitsalobo commented 4 years ago

Hello! I've successfully managed to get the embeddedcommon files to compile and run on ESP32 with PlatformIO using the arduino-espressif32 framework. My files are attached below.

I feel kind of stupid but I'm not quite able to figure this out:

1) I can capture ADC samples with the ESP32, but where exactly do I pass them into your functions to be processed? I'm very unsure about this, but is it PushSample32?

2) I can see that the LED output is being handled by embeddedout header files, but how would I translate that into a format that FastLED would recognize?

Sorry if I'm being a bit dense, I'm not a professional programmer. colorchord_esp32_arduino.zip

cnlohr commented 4 years ago

It is indeed PushSample32

I don't know what FastLED is but it really is just an RGB array. You can just for(...) over it and do whatever you need to do (though I'd make sure whatever it is you're doing isn't MEGA SLOW on the LED side as I've seen some AWFUL LED Drivers do.)

ohnoitsalobo commented 4 years ago

FastLED is a (relatively fast) Arduino LED driver library, so far I've rarely had issues with it on ESP32 and ESP8266. After looking over it, it seems it should by easy to copy over values but it seems I'm getting no output ... fair chance I've cocked up something along the way. I feel like a monster for not commenting my code, lol ... please let me know if you're able to look over it and tell me if I've missed something.

However, I just saw that Espressif has released an official DSP library for the ESP32. See what you can do with that?

PRO2XY commented 4 years ago

Were you able to get it working with ESP32?

ohnoitsalobo commented 4 years ago

I was able to get it to compile without errors, but I was not successful getting output. I gave up after a while and used the arduinoFFT library for sound responsiveness.

cnlohr commented 4 years ago

Aww :(.

Man the things I miss when I am vacant from github for a while :(

qu4nt4r commented 4 years ago

Aww :(.

Man the things I miss when I am vacant from github for a while :(

Well, I shouldnt be the only and last one still figuring out how to make CC work on esp32 in conjunction with FastLED. So thanks in advance for any (more noob friendly) input or work on this subject. :)