#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel pixels(73, 4, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin();
}
void loop() {
for (int i = 0; i < 73; i++) {
pixels.setPixelColor(i, pixels.Color(0, 250, 0));
pixels.show();
delay(50);
}
colorWipe(255, 0, 0, 50); // Red
colorWipe(255, 128, 0, 50); // Orange
colorWipe(255, 255, 0, 50); // Yellow
colorWipe(0, 255, 0, 50); // Green
colorWipe(0, 255, 255, 50); // Cyan
colorWipe(0, 0, 255, 50); // Blue
colorWipe(255, 0, 255, 50); // Magenta
}
// Function to perform color wipe effect across the NeoPixel strip
void colorWipe(byte r, byte g, byte b, int wait) {
for (unsigned int i = 0; i < pixels.numPixels(); i++) {
pixels.setPixelColor(i, pixels.Color(r, g, b)); // Set pixel color
pixels.show(); // Update the strip
delay(wait); // Wait for the next update
}
}