Elijah Scheele
Published © GPL3+

Getting Started with Arduino and NeoPixels

Arduino and NeoPixel Tutorial appropriate for a beginner.

BeginnerProtip30 minutes66,699
Getting Started with Arduino and NeoPixels

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
WS2812 LEDs
×1

Story

Read more

Code

NeoPixel Blink

Arduino
Basic blink but with a NeoPixel
#include <Adafruit_NeoPixel.h>

//define NeoPixel Pin and Number of LEDs
#define PIN 5
#define NUM_LEDS 23

//create a NeoPixel strip
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);


void setup() {
  // start the strip and blank it out
  strip.begin();
  strip.show();
}

void loop() {
  // set pixel to red, delay(1000)
  strip.setPixelColor(0, 255, 0, 0);
  strip.show();
  delay(1000);
  // set pixel to off, delay(1000)
  strip.setPixelColor(0, 0, 0, 0);
  strip.show();
  delay(1000);
}

Credits

Elijah Scheele

Elijah Scheele

9 projects • 60 followers
Developer interested in all sorts of cool projects.

Comments