Dear all, im very new to this forum and to Arduino, so sorry for any stupid questions !
I have tried my best solving my problem, and looked through the internet for solutions.
It's a very simple problem, I have a Adafruit Dotstar LED strip, and I would like to address all 144 LEDs in the command -> strip.setPixelColor(n,blue, red, green); <- n is the LED from 0 to 143
Is it possible to address all LED in a single command? If yes, how do I do it?
I have looked into arrays, but could not make it to work.
Thanks on beforehand
Full program:
#include <Adafruit_DotStar.h>
#include <SPI.h>
#define NUMPIXELS 144 // Number of LEDs in strip
#define DATAPIN 4
#define CLOCKPIN 5
Adafruit_DotStar strip = Adafruit_DotStar(NUMPIXELS, DATAPIN, CLOCKPIN);
void setup() {
#if defined(AVR_ATtiny85) && (F_CPU == 16000000L)
clock_prescale_set(clock_div_1); // Enable 16 MHz on Trinket
#endif
strip.begin(); // Initialize pins for output
strip.show(); // Turn all LEDs off ASAP
}
int head = 0, tail = -10; // Index of first 'on' and 'off' pixels
uint32_t color = 0xFF0000; // 'On' color (starts red)
int i = 0;
int red = 0;
int green = 0;
int blue = 0;
int time = 2;
int newtime = 0;
int rednew = 0;
int greennew = 0;
int bluenew = 0;
void loop() {
strip.setBrightness(100);
strip.setPixelColor(0,255, 255, 255);
strip.show();
}