Hi alto777,
thank you very much for pointing me to FastLED and Adafruit_NeoPixel.
I want to add a more precise description what I'm looking for:
The examples delivered with most libraries suffer from what I call
The experts blindness for beginners difficulties.
The comments are reduced to a minimum. Even inside the Ada_Fruit-example-codes.
I want to give an example: I tried the NeoPixelCylon-example. Inside this example there are some lines of code
void SetupAnimations() {
// fade all pixels providing a tail that is longer the faster
// the pixel moves.
animations.StartAnimation(0, 5, FadeAnimUpdate);
// take several seconds to move eye fron one side to the other
animations.StartAnimation(1, 2000, MoveAnimUpdate);
}
This forces me to do some experiments on what the "5" and the "2000" really means. After having done the experiments by varying the values
I changed the code to use more variables/constants with self-explaining names and extended comments of what is doing what:
void SetupAnimations() {
// fade all pixels providing a tail that is longer the faster the pixel moves.
animations.StartAnimation(0, lengthOfTail, FadeAnimUpdate);
// the number inside "TimeToFinish" is the time (in milliseconds) it takes to move eye from one side to the other
animations.StartAnimation(1, TimeToFinish, MoveAnimUpdate);
}
Of course I can't force anybody to write more than they do because all this is opensource for free. My opinion is
if everybody is invited to put yourself into the position of somebody who does know nothing yet about your code and ask yourself is it easy to understand?
I guess a pretty high percentage of the coders would add some more comments or re-think about the code and re-write parts of it to make it easier to understand.
best regards Stefan