Brief intro:
I am a base level newbe. MFA in sculpture. 66 years old
I just got an Arduino uno, an external 5V power box & a 16X16 WS2812 matrix.
It is all hooked up and currently picking apart code that I have found in various led libraries.
What I need and can't find:
Is code that will light all 256 leds , then transition through all the colors.
At this point I am not interested in animation but just controlling color.
Anyone else out there with interest in color research and leds?
The tutorials I have found are beyond my current newbeness .
I have learned a little by changing values in code to see what happens.
For other newbes in the same boat:
Below is one I have played with and annotated // with descriptions of what the code seems to mean.
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 255
#define DATA_PIN 6
// pin6 is where wire from led matrix is pluged
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
}
void loop() {
for(int i=0; i<NUM_LEDS; i++){
// i=0 means the loop starts at led position 0
// i++ starts the run from 0 to 255. Without the ++ only the first led lights
leds = CHSV(100, 255, 128);
- // Color of the running dot (Hue color,Saturation richness,Value brightness)*
- FastLED.show();*
- // Adding a number, or adding i or i++ in the brackets above causes blinking and slight color change*
- delay(50);*
- // Delay,time between change*
_ leds = CHSV(100,255,100);_
* // (Hue color,Saturation richness,Value brightness)*
* FastLED.show();*
* }*
}