Introduction: Neopixel Water Mood Lamp

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

Step 1: Circuit

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

Step 2: Body

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

and insert it into the can cab.

Step 3: Electronics

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

Step 4: Assembling

Assemble are the things you made.

Step 5: 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);

 }

}



Step 6: Testing

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