Professional Documents
Culture Documents
Sketch Jul27a
Sketch Jul27a
h>
#define NUM_LEDS 7
#define DATA_PIN 27
void setup() {
pixels.begin();
pixels.setBrightness(255); // Adjust brightness if necessary
fillVIBGYORColors();
}
void loop() {
// The colors will be displayed during setup, so no need to do anything in loop
}
void fillVIBGYORColors() {
// VIBGYOR colors: Violet, Indigo, Blue, Green, Yellow, Orange, Red
uint32_t colors[] = {pixels.Color(170, 170/2, 255), pixels.Color(170, 170/2,
255/2), pixels.Color(170, 170*3/4, 255*3/4),
pixels.Color(215, 112, 62), pixels.Color(215, 112/2, 62/2),
pixels.Color(215, 112/2, 62*3/4),
pixels.Color(215, 112, 62)};
pixels.show();
}