// Include the NeoPixel library for LED strip control
#include<neoPixel.h>
// Define hardware connections and configuration
#define LED_PIN 9 // Digital pin for LED data signal
#define NUM_LEDS 30 // Number of LEDs in the strip
// Create NeoPixel strip object
neoPixel strip = neoPixel(NUM_LEDS, LED_PIN);
void setup() {
// Initialize LED strip
strip.begin(); // Init.
strip.setAll(&black); // Lets go dark.
strip.show(); // Show it.
}
void loop() {
// Cycle through colors using predefined values
strip.setAll(&red);
strip.show();
delay(1000);
strip.setAll(&green);
strip.show();
delay(1000);
strip.setAll(&blue);
strip.show();
delay(1000);
strip.setAll(&black);
strip.show();
delay(1000);
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
rgb1:DOUT
rgb1:VDD
rgb1:VSS
rgb1:DIN