WiFi Controlled Light Switch

Introduction: WiFi Controlled Light Switch

In this instructable, I will show you how to make a WiFi controlled Light Switch. I know that I could have used a relay, but I didn't want to modify any electrical things in the house.

Step 1: Parts and Tools

Here are the parts and tools that you will need to make this project:

Parts:

Micro servo

Linkit ONE microcontroller

Jumper wire

Tools:

Computer with the latest version of the Arduino IDE and linkit ONE drivers

Hot glue gun and hot glue

Step 2: Wiring

Using jumper wires, wire the negative pin from the servo to the GND pin on the linkit one, the positive servo wire to 5v, and the signal wire to pin 9.

For the wifi connection to work, you will need to plug in the wifi antenna. Do this by pushing the uFL plug unto the middle uFL connector of the board marked "WiFi/BT ant".

Step 3: Upload Test Code

Download the attached test code and double click it to open. Then, make sure you have the linkit ONE board selected in the Arduino IDE and press upload. Once the upload has completed, open the serial monitor and copy the first IP address shown and paste it into an internet browser. If it shows 3 buttons, you have done everything right so far. Onto the next step.

Step 4: Upload Final Code

In this step,download the final code, double click to open, and press upload. The only difference between the test code and this is that the test code required the serial monitor to be open while in use and the final one doesn't.

Step 5: Mount Servo to Switch Plate

Use hot glue to mount the two servos; one at the top of the switch, and one at the bottom. Power the board, paste in the IP address into a web browser, and press on. This will make the servo connected to pin 9 go to the position that it will need to press the top of the switch. Remove the servo horn and put it back on making sure that it touches the switch. You also do this for the servo connected to pin 8, just instead of pressing "on", press "off".

Step 6: Done!

You have finished this instructable! If you liked it, please "like" this or leave a comment!

Cannot get it to compile; can you give some info on Arduino / LinkIt One platform and software versions? I am relatively new to board development. I tried both Arduino 1.6.6 / 1.67 (Windows) but any compilation gives "Warning: platform.txt from core 'MediaTek ARM7 EJ-S (32-bits) Boards' contains deprecated ... Consider upgrading this core." After downgrading to 1.6.5 I got basic sketches to compile (e.g. blink) but software is now confused by multiple Servo libraries. I get "Multiple libraries were found for "Servo.h"" and "This library only supports boards with an AVR, SAM or SAMD processor." https://github.com/arduino/arduino-builder/issues/38

Just a thought... Couldn't you just use a single servo right in the middle? There would be a small delay, but not much. Have the servo rest straight out, travelling ~110 degrees up for on, and down for off.

Otherwise, very nice way to automate. Handy for people who live in places where they aren't allowed hard modifications.