Introduction: LinkIt One - Mood Lamp

In the last instructable I showed you how to monitor your room temperature online with the help of the LinkIt One board. Now in this tutorial I would show you how to make a internet controlled mood lamp, that monitors your temperature and lets you know when your internet is down.

This is the upgrade to a previous instructable that I assembled using an Arduino but this has a lot IoT features add to it. This instructable uses the Blynk app which is a popular IoT control app and it works great with the Linkit One. The Blynk app is available for Android and iPhone devices.

Step 1: Components

As always lets start with getting all the components required.

Components

  • LinkIt One
  • RBG LED (or Individual red, blue, green LEDs)
  • Bluetooth Module (I used HC-05)
  • Li-ion Battery
  • An old bulb
  • Plywood

Step 2: Circuit

The circuit is very simple, all the connections you have to do is the RGB LED. The RBG LED that I'm using is a common anode LED and if you are using a common cathode make sure to connect cathode to the ground pin. The connections goes as follows -

  • LED anode terminal to +3.3V of the LinkIt One
  • LED red terminal to Digital Pin 3 of the LinkIt One
  • LED green terminal to Digital Pin 4 of the LinkIt One
  • LED blue terminal to of the LinkIt One

Step 3: Code

After you complete the circuit, now it is time to upload the code to the LinkIt One. You can upload the code found below in the arduino IDE and make sure you enter your WiFi SSID and password in the field where it says SSID and password. Upload the code to the suitable Com port.

#define ARDUINO 150

#include

#include

#include

// You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "ACCESS TOKEN";

#define WIFI_AP "SSID" #define WIFI_PASSWORD "PASSWORD" #define WIFI_AUTH LWIFI_WPA // choose from LWIFI_OPEN, LWIFI_WPA, or LWIFI_WEP according to your WiFi AP configuration int tempPin = A0; float temp; void setup() {

Serial.begin(9600);

Blynk.begin(auth, WIFI_AP, WIFI_PASSWORD, WIFI_AUTH);

Serial.println("System start!");

}

uint16_t loop_id=0;

void loop() {

loop_id++;

Serial.println(loop_id);

Blynk.run();

temp = analogRead(tempPin); temp = temp * 0.09765625 *5; // costance (1/1024*100) Blynk.virtualWrite(10, temp); delay(500); }

BLYNK_READ(0) {

Serial.println("Blynk comes to read!");

Blynk.virtualWrite(0, loop_id);

}

Step 4: Blynk App

After uploading the code it is now time to test it and to do that we require the Blynk app you can install the app on your smart phone and register for an account later you need to create a new app and select linkit one as the board update the code with the access token.

Then load in the zebra element and select digital pin 3 for red pin4 for blue and pin 5 for green. Then all you need is to power on the LinkIt One board and run the project. Now as you move the pointer the color of the LED changes with respect to the pointer.

Step 5: The Wooden Box

You see the pics you would probably realize that I'm not so good at woodworking. I tried working with plywood and finally I got this. So I'm not good at instructing it either you may need someone help with this or watch some YouTube videos like I did.

Step 6: Light Bulb

I did not want to leave it at just plane old LEDs, that's when I had an idea of lighting a bulb with it. So all you need is a fused bulb and you have to remove the holder by using a cutter. There are plenty of YouTube videos that demonstrate how to do this.

Step 7: Finishing

By this stage you should have a working mood lamp which looks like the picture. So you may want to add the notify element in the Blynk app which notifies you when your lamp can not connect to the internet (that's when your WiFi is down). Hope you liked this instructable, if you make your own don't forget to use the IMadeIt button.

Comments

author
jmuncher (author)2015-11-13

wait, what is the bluetooth HC05 used for??

About This Instructable

413views

4favorites

License:

Bio: Hi, I just launched an Indigogo campaign support my projects by backing it. https://www.indiegogo.com/projects/tinker-usb-a-wifi-based-badusb#/
More by ThisIsSteve:Linkit One Text to SpeechLinkit One Kitchen TimerIntel Edison Talks to Linkit One
Add instructable to: