NeoPixel LED Strip

Z2M Part: EMA-00003-B to E

Control RGB LED strip using Adafruit NeoPixel library.

Circuit Diagram
Circuit diagram for NeoPixel LED Strip
Wire Connections & Pin Configuration

Wire Color Connections:

Yellow/Green → Digital Pin 6 to NeoPixel DIN
Red → 5V to NeoPixel VCC
Black → GND to NeoPixel GND

Pin Configuration:

Arduino Digital Pin 6 → NeoPixel strip DIN (data in)
Arduino 5V → NeoPixel strip VCC
Arduino GND → NeoPixel strip GND
Arduino Code
Edit
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

// Define pin connected to NeoPixel data line
#define PIN 6

// Define number of NeoPixels
#define NUMPIXELS 8

// Create NeoPixel object
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

// Delay between lighting each pixel (in milliseconds)
int delayval = 500;

void setup() {
  // Initialize NeoPixel library
  pixels.begin();
}

void loop() {
  // Loop through each pixel in the strip
  for (int i = 0; i < NUMPIXELS; i++) {
    // Set pixel color (RGB: 0,150,0 -> moderate green)
    pixels.setPixelColor(i, pixels.Color(0, 150, 0));

    // Send updated color data to strip
    pixels.show();

    // Wait before lighting next pixel
    delay(delayval);
  }
}

Instruction Details

Wiring: Connect NeoPixel strip DIN (data in) to Digital Pin 6. Connect VCC to 5V and GND to GND. Use external 5V for long strips.
Library: Sketch → Include Library → Manage Libraries → search "Adafruit NeoPixel" → Install.
Upload Code: Tools → Board → Arduino Uno. Tools → Port → select your COM port. Click Upload button.
View Output: LED strip displays colors and patterns. Set correct LED count in code.

How to Use

  1. Connect the required components as per the Pin Configuration above
  2. Open Arduino IDE and create a new sketch
  3. Copy and paste the code above
  4. Select your Arduino board and COM port from Tools menu
  5. Click the Upload button to upload the code to your Arduino
  6. Open Serial Monitor (if applicable) to see the output

Components Required

  • Arduino Uno
  • WS2812B NeoPixel LED Strip
  • Breadboard
  • Jumper Wires
  • External 5V Supply (optional, for long strips)

Category: LEDs & Display