Portable RGB Lighting for Photography/Selfie - Battery Operated
by thelonelyprogrammer in Circuits > Arduino
706 Views, 2 Favorites, 0 Comments
Portable RGB Lighting for Photography/Selfie - Battery Operated
A good lighting set is more important than an expensive SLR camera
Things Used in This Project
Hardware components
- Arduino UNO×1
- Adafruit NeoPixel Ring: WS2812 5050 RGB LED×1
- SparkFun Pushbutton switch 12mm×1
- 9V battery (generic)×1
- Dot board×1
Software apps and online services
- Arduino IDE
- Adafruit Neopixel Library - https://github.com/adafruit/Adafruit_NeoPixel
Connections
We need to connect the Neopixel WS2812B and the push button to the Arduino UNO. The Pushbutton connected to D6 of the Arduino.
→ We can power this project with a 9V battery as well as a micro-USB cable. Here, I'll be using the micro-USB cable to upload the sketch and then power the circuit using the 9V battery. simply connect the +ve to the VIN of the Arduino and -ve to GND.
→ Connection to the Neopixel WS2812B LED ring is done by the following:
- Arduino→ Neopixel WS2812B
- Vcc → 5V
- GND → GND
- Digital Pin 7 → DI
Installing Neopixel Library
We can install Adafruit's Neopixel library from the Library Manager. Select the latest version and click Install.
Now open the example project and run it. Change the NUMPIXEL to the desired value based on the LED ring purchased. Here I've used a 16-pixel Neopixel LED ring.
Application
Configuring the Button:
The Pushbutton is connected between D7 and the ground. You can use it as a button. Set pinMode(7, INPUT_PULLUP) and you will read D7 LOW if the button is pressed. Whenever the button is press, each Neopixel color is configured as per the following modes.
1. Color changes to Red, Blue, Green, respectively.
2. Color chases to White, Red, Blue respectively.
3. Rainbow (VIBYOR)
Code
You can find the code on my GitHub repository. Link to the Project repo: https://github.com/Rahul24-06/Portable-RGB-Lighting-for-Photography-Selfie
To upload the code, choose Arduino UNO, and the Upload Speed to 115200. Before Lighting & After Lighting Pictures
Working
https://github.com/Rahul24-06/Before Lighting & After Lighting Pictures are shown above.
Voila! We finally did this project successfully. If you faced any issues in building this project, feel free to ask me. Please do suggest new projects that you want me to do next.
Give a thumbs up if it really helped you and do follow my channel for interesting projects. :)
Share this video if you like.
Blog - https://rahulthelonelyprogrammer.blogspot.com/
Github - https://rahulthelonelyprogrammer.blogspot.com/
Happy to have you subscribed: https://www.youtube.com/c/rahulkhanna24june?sub_confirmation=1