looking for help with what i believe to be a fairly basic project.... guess ill do my best to describe what I'm looking for and someone who's interested in helping will contact me? lol heres hoping!
parts
arduino uno
1 rgb 5050smd strip split in two pieces (12v)
1 ws2812b rgb5050smd individually addressable(5v)
a few momentary pushbuttons
parallax sound impact sensor
basically i have led strips in 3 different areas...id like to be able to turn on/off each of the 3 groups of lights individually with three momentary pushbuttons and then cycle them through a series of cool light sequences.... i also want to be able to have the light react to bass on one or all strips. lastly id like a button to toggle the first strip thats split in two pieces...
i have been trying to self teach myself but its not going very well... i don't understand programming at all
..... iv been able to hook up my ws2812b strip and run adrafruits strand test but adding my own light effects and the push botton toggle i cant figure out... also have no idea how i would run that program along side the program that would run the 2 other strips....
below is the music reactive code for the first strand but i haven't been able to find one for the addressable strand
//Van der Stappen ©
#define REDPIN 5
#define GREENPIN 6
#define BLUEPIN 3
int redNow;
int blueNow;
int greenNow;
int redNew;
int blueNew;
int greenNew;
void setup()
{
pinMode(7,INPUT); //SIG of the Parallax Sound Impact Sensor connected to Digital Pin 7
pinMode(REDPIN, OUTPUT);
pinMode(GREENPIN, OUTPUT);
pinMode(BLUEPIN, OUTPUT);
redNow = random(255);
blueNow = random(255);
greenNow = random(255);
redNew = redNow;
blueNew = blueNow;
greenNew = greenNow;
}
#define fade(x,y) if (x>y) x--; else if (x<y) x++;
void loop()
{
boolean soundstate = digitalRead(7);
if (soundstate == 1) {
analogWrite(BLUEPIN, blueNow);
analogWrite(REDPIN, redNow);
analogWrite(GREENPIN, greenNow);
redNew = random(255);
blueNew = random(255);
greenNew = random(255);
// fade to new colors
while ((redNow != redNew) ||
(blueNow != blueNew) ||
(greenNow != greenNew))
{
fade(redNow,redNew)
fade(blueNow,blueNew)
fade(greenNow,greenNew)
analogWrite(BLUEPIN, blueNow);
analogWrite(REDPIN, redNow);
analogWrite(GREENPIN, greenNow);
delay(1);
}
}
else{
digitalWrite(REDPIN,0);
digitalWrite(GREENPIN,0);
digitalWrite(BLUEPIN,0);
}
}