This is my first post on the forum, but I'll try to be as clear as possible. Thank you in advance for all of your help.
The project that I am trying to create is a DotStar LED strip that is connected to an arduino uno, which gets MP3 digital input via the Arduino's USB port, and makes light patterns based on the frequencies. (I'd love to be able to code the light patterns too.)
Right now, the path I am going down is using the Firmata firmware on the Arduino, and then trying to use the Processing environment to do something like this: http://www.instructables.com/id/How-to-Make-LEDs-Flash-to-Music-with-an-Arduino/?ALLSTEPS
The problem that I'm encountering, is that I can't find a library in Processing that will allow me to control an addressable strip of lights as opposed to individual LEDs like in the example.
The two options I'm thinking of right now are figuring out Open Pixel Control like here: Download Software | Dauntless Dotstar Gauntlets | Adafruit Learning System
or trying to make a DotStar class in Processing to use (although I'm not sure how to do this really)
Thanks in advance again, I would really appreciate any tips or guidance if anyone has done something similar or is knowledgable!
If you are going to use Firmata then you can not drive a Dotstar strip.
Avoid Instructables unless you know what you are doing, never use it to learn anything is is a totally crap website.
Write code to receive data from the serial port and use it to drive the Dotstar. Then send the data you want from processing. This is not hard but not exactly a beginner's project. Take it one step at a time.
Ok, thank you Mike.
So I should write a sketch for the Arduino that receives data from the serial port and does effects to the Dotstar, utilizing effects from the FastLED library? And then write a program for Processing that takes MP3 input and then sends commands to the Arduino? So, basically the Arduino is functioning like a server?
Thanks again for your help!
However off hand I don't know if you can do the MP3 input bit in processing.
Mp3 input? No, can’t do it on a traditional arduino (ie, an avr)
Maybe with an arm-based board like the due / zero or teensy you could do it from an analog audio stream?
Easiest way would be to use an mseq7 to get relative volume of different frequency bands, and then an any arduino could use that to select the pattern for the dotstar.
Firmata and anything like that is totally inappropriate for serious projects. Fine for simple data acquisition and shit only
Actually, another possibly better approach would be to use a real computer or a pi to do the interpretation of the audio, and have that just blast out the pattern over serial so the arduino would just be converting to dotstar’s protocol
Take a look at the MSGEQ7 chip
@DrAzzy, I was thinking of using something like the BeatWrite Program in this example: http://www.instructables.com/files/orig/FG7/M2S2/GF5VAQ9Q/FG7M2S2GF5VAQ9Q.zip
I'd use this to analyze the audio, and then I would have the program send commands to the Arduino. But the main question with that, is if the Arduino can receive real-time input? Like could I program a few functions onto the Arduino and then send commands via the Computer (really the song) so that lighting effects were displayed real-time.
@Grumpy_Mike, I fairly sure processing can handle the MP3 analysis.
Thanks again guys. If anyone has any example programs that either send commands to an Arduino via processing, or programs that send commands to Dotter with real-time input, or anything else applicable, it would be really helpful as well.
But the main question with that, is if the Arduino can receive real-time input?
Yes it can.
Like could I program a few functions onto the Arduino and then send commands via the Computer (really the song) so that lighting effects were displayed real-time.
Take a look at the MSGEQ7 chip
Take a look at what I dis with one:- Spectrum Display on Vimeo
If anyone has any example programs that either send commands to an Arduino via processing,
Talk_arduino.pde (1.19 KB)
Thanks a lot Mike. I will post here if I have questions as I start writing the code. I decided to get an MSGEQ7 chip, and am just going to write a sketch on the Arduino to handle frequencies input via Audio Analog input, and perform effects on the light based on that.