Easy IoT RGB Bed Lamp From Used Stuff With Cayenne

by Kuncono in Circuits > LEDs

3612 Views, 44 Favorites, 0 Comments

Easy IoT RGB Bed Lamp From Used Stuff With Cayenne

IMG_1081.JPG
IMG_1088.JPG
IMG_1086.JPG

Hi there.

I wanna share how to create IoT RGB Bed Lamp from used stuff and controlled by Cayenne.

This lamp can controlled with Red, Green, Blue Slider over the Internet.

Bill of Materials

113990105 1.jpg
rainbow LED 2-384x384.jpg
MicroUSB.jpg
FGFQB07HX7P7I3J.MEDIUM.jpg
292982_large.jpg
51x8K7degTL._SL1000_.jpg
tape2.jpg
IronStand.jpg
Best-soldering-wire-3.jpg
scissors_PNG25.png

Hardware required :

- NodeMCU ESP12E as microcontroller

- Rainbow LED FC-102

- Cell phone charger

- Some cables to connect NodeMCU with LED

- Used mineral water bottle

- White plastic bag

- Adhesive tape

Software required :

- Arduino IDE

- Adafruit NeoPixels Library for Arduino

- Cayenne for iOS/Android/Web Browser

Handtool required :

- Soldering iron

- Soldering tin

- Scissor

Connecting NodeMCU to Rainbow LED FC-102

This is the connection beetwen NodeMCU with Rainbow LED :

NodeMCU Rainbow LED

VIN VCC

GND GND

DIN D2

You need to use soldering iron to join the cable with rainbow led. You can cut one side of jumper cable and solder them to rainbow led and connect to NodeMCU with the connection map above.

Programming the NodeMCU

In this step we will program the NodeMCU with Arduino IDE.

First, you need to import Adafruit Neo_Pixels library to your Arduino IDE. You can search NeoPixels library from Sketch - Include library - then search Adafruit NeoPixel and install it.

Second, download LIGHT.ino from this step.

Third, open LIGHT.ino and edit your Cayenne token, SSID, password and then connect your NodeMCU with USB Cable to your computer and upload the code to NodeMCU.

Downloads

Creating Case for the Lamp

IMG_1082.JPG
IMG_1083.JPG
IMG_1084.JPG

- Take the mineral water bottle.

- Release the sticker (normally on the body of bottle)

- Cut the neck of bottle until get flat cylinder form

- Take the plastic bag, cut it and patch it to cylinder and bond with adhesive tape

- Place the NodeMCU with LED above (arrange to fit the case)

- Give hole on the side of bottom case for supply the power

Setting Up Cayenne Widget

Light-Cayenne.JPG

Add three silder widget from Cayenne Dashboard :

1. Give slider widget name with Red, connected to Virtual Pin 6, data : voltage, min value 0, max value 255

1. Give slider widget name with Green, connected to Virtual Pin 7, data : voltage, min value 0, max value 255

1. Give slider widget name with Blue, connected to Virtual Pin 8, data : voltage, min value 0, max value 255

Done !!!

IMG_1086.JPG
IMG_1088.JPG
IMG_1081.JPG

Now you can control the bed lamp with your smartphone/web browser.