Jeremy Lindsay
Published © MIT

A Model Lighthouse Using an Adafruit NeoPixel Ring

A model lighthouse, built with 3D printing, using an Adafruit NeoPixel Ring for the lights.

EasyFull instructions provided12 hours1,185
A Model Lighthouse Using an Adafruit NeoPixel Ring

Things used in this project

Hardware components

Adafruit - Neopixel Ring: WS2812 24 RGB LED
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
LM2596 DC-DC Step down voltage converter
×1
PLA Filament - Red
×1
PLA Filament - White
×1
PLA Filament - Black
×1

Software apps and online services

Arduino IDE
Arduino IDE
Adafruit Neopixel Library

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Link to CAD designs, STLs

Code

Sketch for the model lighthouse

C/C++
This uses an 24 LED Neopixel ring, and 3 LEDs are lit (two white, one in the middle is red). These rotate around the ring.
#include <Adafruit_NeoPixel.h>

#define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, PIN, NEO_GRB + NEO_KHZ800);

void setup() 
{
  strip.setBrightness(5);
  strip.begin();
  strip.show();
}

void loop() 
{
  for (int i = 24; i < 48; i++)
  {   
    strip.setPixelColor((i - 1) % 24, 0, 0, 0);
    strip.setPixelColor(i % 24, 255, 255, 255);
    strip.setPixelColor((i + 1) % 24, 255, 0, 0);
    strip.setPixelColor((i + 2) % 24, 255, 255, 255);
    
    strip.show();
    
    delay(100);
  }
}

Link to Arduino sketch

Credits

Jeremy Lindsay

Jeremy Lindsay

4 projects • 21 followers
I'm a software engineer who likes building things. C#, 3d printing, robotics, embedded software, and electronics.

Comments