I thought I explained what you need to do. When the state goes LOW, you need to turn off the LEDs, then show the new state.
No I missed that, thank you for clarifying, the blinker part works now!
//simplify syntax for yellow color
uint32_t yellowl = strip_left.Color(255, 255, 0);
uint32_t yellowr = strip_right.Color(255, 255, 0);
uint32_t offl = strip_left.Color(0, 0, 0);
uint32_t offr = strip_right.Color(0, 0, 0);
//Configure Input Pins
lsiState = digitalRead(Left_Signal_Input);
rsiState = digitalRead(Right_Signal_Input);
//Actions for Blinkers
if(lsiState == HIGH) {
strip_left.setPixelColor(0, yellowl);
strip_left.setPixelColor(1, yellowl);
strip_left.setPixelColor(2, yellowl);
strip_left.setPixelColor(3, yellowl);
strip_left.show();
}
if(lsiState == LOW) {
strip_left.setPixelColor(0, offl);
strip_left.setPixelColor(1, offl);
strip_left.setPixelColor(2, offl);
strip_left.setPixelColor(3, offl);
strip_left.show();
}
if(rsiState == HIGH) {
strip_right.setPixelColor(0, yellowr);
strip_right.setPixelColor(1, yellowr);
strip_right.setPixelColor(2, yellowr);
strip_right.setPixelColor(3, yellowr);
strip_right.show();
}
if(rsiState == LOW) {
strip_right.setPixelColor(0, offr);
strip_right.setPixelColor(1, offr);
strip_right.setPixelColor(2, offr);
strip_right.setPixelColor(3, offr);
strip_right.show();
}
When I try to change colors with the app, the pixels will only quickly blink the desired color... I gather that's because there is no load on the input pin. Is there a away that I can have the blinkers revert to whatever color they were if it doesn't receive any load on the pin after 1 second after the load is detected?
I am not sure if that would be the correct way of doing it... I just want to be able to adjust the led colors with the app, then the blinker can override the color when activated and go back to whatever state it was in when the blinker is deactivated. I don't understand how I can have both functionality work.
Thank you for your help!