Introduction: Wi-fi Enable Almost Anything

About: I am here to share what I make. Hopefully, you can learn from watching what I have done and even improve upon it. As an Amazon Associate I earn from qualifying purchases.

If you have never used Blynk before, you should check it out. This creation can be used for a lot of things - not just a lava lamp. You could have it turn on your coffee maker in the morning or make an automatic night light. Really though, I just made it for fun.

Step 1: Set Up the App

For this project you will need to have both the Arduino IDE on your computer, and the Blynk app on a smart phone or tablet.

This page has full documentation about how to get yourself set up. (If you have used Blynk before then you can probably skip this step.)

Once you gain an understanding of the app, follow these steps to set up your project.

  1. Open the widget box (+ icon)
  2. Add a button
  3. Set the button's pin to V0, and the other two boxes to 0 and 180 (in that order).

Step 2: Set Up the Device

I am using a SparkFun Blynk Board, but you can really use any Blynk-enabled device. If you are using a Blynk Board, then SparkFun has a tutorial about how to get it set up and get started. The second link is about how to set up your board to allow its code to be edited in the Arduino programming environment. (again if you already know what you're doing, you can skip these):


If you have made it this far, here is the code you should use:

<p>/*You will need to replace these three things with your own information:<br>char BlynkAuth[] = "yourauthcode"<br>char WiFiNetwork[] = "yourwifinetworkname"<br>char WiFiPassword[] = "yourwifipassword"<br>*/</p><p>#include <br>Servo myservo;</p><p>#include <br>#include </p><p>#define BLYNK_PRINT Serial</p><p>char BlynkAuth[] = "yourauthcode";<br>char WiFiNetwork[] = "yourwifinetworkname";<br>char WiFiPassword[] = "yourwifipassword";</p><p>void setup() {<br>  Serial.begin(9600); <br>  myservo.attach(12);<br>  Blynk.begin(BlynkAuth, WiFiNetwork, WiFiPassword);<br>}</p><p>void loop() {<br>  Blynk.run();<br>}</p><p>BLYNK_WRITE(V0) {             <br>  int pinData = param.asInt();<br>  myservo.write(pinData);<br>}</p>

Step 3: Build a Contraption

Instead of using something more complicated like a relay, I made a relatively simple contraption: for this you can either buy a plug-in-switch like the one in the picture just use a wall switch (for your house lights). I used a large servo motor, some popsicle sticks, a hot glue gun, and some plastic toys to create a proof of concept for this project that can easily operate high voltage devices.

Step 4: Put It All Together

The lava lamp (or other appliance) has to be plugged into the electric switch which is operated by the servo motor that needs to be connected to the blynk board, and the board needs power.

  1. I used a phone charger and a usb cord to supply power
  2. The servo's wires are connected as follows: red to Vin, black to Gnd, and yellow to pin 12
  3. Plug everything in to a wall outlet
  4. Use blu-tac to keep things from dangling - unless you don't mind it
  5. The servo motor needs to be manually calibrated: experiment in the app to find out what numbers should be set in the button widget (instead of 0 and 180) to successfully manipulate the light switch.

Open the app and turn everything on to give it a try. You could also try automating it by using some of the app's other widgets like the GPS or the timer.

Remember to comment with any questions and to check out the project's page!

Wireless Contest

Participated in the
Wireless Contest