Neopixel Water Mood Lamp

by mitwoon in Circuits > LEDs

519 Views, 8 Favorites, 0 Comments

Neopixel Water Mood Lamp

DSC02910.JPG
DSC02909.JPG
ezgif.com-gif-maker.gif
IMG_0020.JPG

a few days ago I was thinking about the lamp and I suddenly realized that water makes the light spread.

so I decided to make a lamp with water.

this project is very simple and easy to make.


Supplies

Arduino nano

candy can

tube-shaped bottle

Neopixel

Circuit

you have to connect pin6 to Neopixel IN and 5V to VCC and GND to GND.

Body

20211225_145452.jpg
20211225_150316.jpg
20211225_150337.jpg
IMG_0011.JPG
IMG_0012.JPG

fill the water into the bottle and sill with hot glue and thin plastic

and insert it into the can cab.

Electronics

3_jg0Ud018svc9vdhivq2w62i_vbhdph.jpg
4_1g0Ud018svc3hgmwkyblkto_vbhdph.jpg
3_ig0Ud018svcqbixedj671tq_vbhdph.jpg

glue the arduino nano and stick the Nropixel to the bottom of the main lamp.

Assembling

IMG_0016.JPG

Assemble are the things you made.

Coding

you have to install the Adafruit Neopixel Library in the library manager

and you can find many example codes on the internet.

I used this code




#include <Adafruit_NeoPixel.h>


#define LED_COUNT 6

#define LED_PIN  1


Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);


void setup() {

 strip.begin();

 strip.show();

 strip.setBrightness(50);

}



void loop() {

 rainbow(10);

}


void rainbow(int wait) {

 for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256) {

  for(int i=0; i<strip.numPixels(); i++) { 

   int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());

   strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));

  }

  strip.show();

  delay(wait);

 }

}



Testing

DSC02910.JPG
DSC02898.JPG
DSC02897.JPG

test the lamp and you can change the code to change the color .