hey guys so i tried everything i know on this sample program to let the leds run from last led to first led but dont know how to change the for function...
static void chase(uint32_t c) {
for(uint16_t i=0; i<strip.numPixels()+4; i++) {
strip.setPixelColor(i , c); // Draw new pixel
strip.setPixelColor(i-4, 0); // Erase pixel a few steps back
strip.show();
delay(25);
}
}
so the first code i posted lets 4 leds run from left to right
the code you guys fixed lets the leds run from right to left
is there a way so that the leds runs from left and right togheter to meet at the middel and then back to the sides where they came from?
thanks ok one question that would maby assist as i tip would i do it with more ifs in the same code aswell with another i but not using i maby like j or so
I wrote my first computer program in 1970, when I was studying Physics at University. And even then it wasn't new. The first high level language called Colbol was introduced in the mid 50s with the claim that now anyone could program a computer.
Before that in the 40s you had to use machine code in order to run a computer. I met one person who did that, when I was teaching at a University.