Hi everybody,
Nearly a noob here, just an "engineer" who is interested in Arduino - hope you guys will forgive some "stupid" questions.
I´m looking for a method to turn some LED´s in a row behind each other on and off, as fast as the human eye can see. So it looks like the whole row is lighted, although only one LED is lighted at once.
The aim is to reduce the needed power supply to a minimum, due to only few lighted LED`s.
This is what it´s looks like now, and I still got the "flickering" LED`s 0-4...
Do I have to speed up the frequency maybe?
Hardware: Arduino Uno
#################################
#include <Wire.h>
#include <DS3231.h>
#include <SPI.h>
#include <FTRGBLED.h>
const int NUM_LEDS = 11;
const int clockpin = 2;
const int datapin = 3;
const FTLEDColour LED_COLOUR = LED_WHITE;
RGBLEDChain leds(NUM_LEDS, clockpin, datapin);
void setup()
{
Serial.begin(9600);
leds.begin();
}
void esist()
{
for (int i=1; i< 4; i++)
{
int ii=i-1;
leds.setLED(ii, LED_COLOUR);
leds.update();
leds.setLED(ii, LED_BLACK);
leds.update();
}
}
void loop()
{
esist();
}
##############################
I´m very thankful for any comments and hints 
Thanks!
for (int i=1; i< 4; i++)
{
int ii=i-1;
Why not
for (int ii=0; ii< 3; ii++)
{
Thanks for the hint!
Didn´t knew that it´s possible to start the for-looop at "0" 
Do you also know how to increase frequency or something else?
Thanks!
Lukas
Didn´t knew that it´s possible to start the for-looop at "0"
In over 99% of code the for loop starts with a zero, this is so that if you want any number of iterations you just put
“< numberOfItterations “
You can’t change the PWM frequency that the WS2801 sends to the LEDs.
luaks1493:
I´m looking for a method to turn some LED´s in a row behind each other on and off, as fast as the human eye can see. So it looks like the whole row is lighted, although only one LED is lighted at once.
The aim is to reduce the needed power supply to a minimum, due to only few lighted LED`s.
You seem to be confusing a technique used with ordinary LEDs with the usage of the WS2801. You will never see any advantage using your proposed scheme over just sending smaller data values to the WS2801.
Create a loop running at NUM_LEDS * F. (F can probably be 30 - 60 Hz). Step through your array data and only send the data for the current WS2801 while sending all zeros for all other WS2801s.
You will prove to yourself that there is no point in doing this.