How would i go about making a set of leds flash a color once

how would i go about resetting that after the signal is removed though, currently it only works once before i have to reset the arduino

So here’s the issue I’m having: I have no idea what those d9-d11 checks are for. I don’t know what they represent, I don’t know what causes their state to change. While I know the condition that would cause them to trigger, I don’t know what causes said condition and it’s hard to determine what’s happening when and where. As written, what you’re saying is, if ALL THREE of them are ‘1’ at the same time, only then will the code inside of the statement run. Otherwise it never runs. Not knowing what the intended result is or should be, I can’t say if that’s the correct approach or not, nor if that’s where to enter a reset for the color value.

The code essentially loops, waiting for one of the pins to pull down, due to the fact that i have them set to INPUT_PULLUP, which then will run the code in that particulear statement. Since the inputs are being pulled up, all it takes is grounding that pin, turning it to a 0, to trigger the code. i asked the person who is building the actual mechanical side of the project what he was going to use to trigger the states and he hasent got back to me yet. d9-d11 correspond to the same named pins on an arduino nano, which is the arduino that im using.

Ok, so then you have a problem. If what you’re saying it correct, then when you release the button, they should revert back to a value of ‘1’. And if all three buttons reverted back to ‘1’, then that if statement will be true, and the code inside of that if statement will run, and resetting the color variable back to 0. But you’re saying that isn’t working. Which means, somewhere, somehow, your buttons are not resetting back to ‘1’ when you release them.

I have another question, what would be the easiest way to make a single dot travel down a led strip, leaving copies of itself behind, until it reaches the end and then restart, only blanking the strip one color at a time the second time

Uh … leaving copies of itself behind, that’s just a regular fill, one at a time. And I’m not understanding the second part.

one, how would i make it fill one at a time and two i meant like a one at a time fill only black(no color) instead of a color

Yeah, so that’s a regular fill, both of them.

// in the loop, or wherever you’re doing this
for (px = 0; px < NUM_LEDS; px++) {
leds[px] = CRGB::Red;
LEDS.show();
// add a delay if you want to slow it down
}

Then do the same, but with CRGB::Black instead.

Thank you, i started looking through the examples in case i didnt see something and noticed the cylon program that uses that exact method