loading

I have always been fascinated by colorful lights. I have Philips Hue at home but that is expensive and I took it on self to build my own colorful lights controlled via Phone or computer.

I had been able to make on Bluetooth controlled LED strip to begin with but Bluetooth has its limitations so WiFi would be the way to go. ESP8266 made it pretty easy to build or so it seems while looking at the various posts or videos on the internet. This Instructable is a step forward to making it.

Step 1: Components.

We are going to use our ESP8266-01 board that we hooked up with an adapter some days back. The details of that are available here.

Apart from that you will need USB to serial converter, some jumper wires, a breadboard if you may or you can use male - female jumper wires to connect directly to LED and USB serial (FTDI) converter.

And an LED of course. I like the Blue ones.

Step 2: How To?

Open up Arduino IDE. I have version 1.6.7. I had to add custom board for ESP. This can be managed easily by going through the preferences menu option in File menu.

Custom board URL for ESP http://arduino.esp8266.com/package_esp8266com_inde...

Wire up the LED as shown in the diagram.

One point to note over here is how to get ESP8266 in to programmable mode. (We struggled a lot for this one.)

To get ESP board into programmable mode we need to connect the GPIO ) pin to ground and then remove power and reconnect power. At times it worked without switching the power off and on but we were not sure when it worked so we always made sure to toggle the power when ever we connected / disconnected GPIO 0 to ground.

Once you get the board in programmable mode the blue indicator LED flashes momentarily.

Load the Example from Arduino IDE > File > Examples > ESP8266webserver > HelloServer

We edited the following code lines to switch on the led and switch it off on basis of the URL. We would also need to change the SSID and Password for our WiFi.

server.on("/inline", [](){
server.send(200, "text/plain", "this works as well"); });

server.on("/on", [](){

digitalWrite(2, HIGH); server.send(200, "text/plain", "this works as well"); });

server.on("/on", [](){
digitalWrite(2, LOW); server.send(200, "text/plain", "this works as well"); });

So instead of /inline when we call the ESP IP/on it lights up the LED and /off switches it off.

The demo can be seen in the Video. All this has been just a step forward to have LED strips controlled over WiFi. More on that soon.

<p>Nice one, you should get an RGB light, and allow colors to change from the webapp.</p><p><a href="https://codebender.cc/sketch:232105">Here is a small function on how to change colors</a></p><p>At the bottom is the function and you can use it like this:<br>color(255,0,0); //to turn on the red light etc...</p><a><br></a><a><br></a>
I am onto make it like that. In fact already made it last weekend. https://youtu.be/LiDIHwnrwV0

About This Instructable

1,734views

33favorites

License:

Bio: A solution architecht by profession, engineer by thought!
More by Mtaram:SD Card hack for Macbook Pro Retina 13 inch ESP8266 Network LED ESP8266-01 Adapter 
Add instructable to: