Create Your Own Smart Light Using Electric Imp
by andrea.reginato in Circuits > Remote Control
1119 Views, 10 Favorites, 0 Comments
Create Your Own Smart Light Using Electric Imp
Create your own smart light using Electric Imp. Learn how to control and monitor your lights from mobile, tablet and desktop in 15 minutes. $44 in hardware. Entry level.
Hardware
To complete this tutorial you need the following components.
- 1 Electric Imp Sparkfun $29.95
- 1 Breakout Board Sparkfun $12.95
- 1 Push button Component packs $0.35
- 1 Led Component packs $0.35
- 1 10K Ohm resistor Resistor kit $0.251
Software
In order to connect Electric Imp to the internet follow the official Getting started guide. To fully understand this tutorial you need to know the Electric Imp's concepts behind Agent and Device entities.
Hardware Setup
This schema represents the led, resistor and pushbutton setup. With this setup each time you press the button, the LED is turned on and off.
Software Setup
Open Lelylan Dashboard and create a new device by following 3 simple steps (if you are new to Lelylan, you can sign up for free).
Set a meaningful name (e.g. bedroom light).
Choose the device type. For this tutorial choose Basic Light. What is a type? A type defines what a device is by defining its properties, functions and statuses. For this tutorial you do not need to now more about.
In order to communicate with the physical device you need to connect Lelylan with the Electric Imp agent. Every agent has a unique url that can be found in your Electric Imp Ide. Copy and paste it into the Custom URI field. In this way Lelylan will forward all requests coming from the dashboard (or APIs) to the Electric Imp.
Get the Device ID and Device Secret. Once the device is created, click the settings link (placed under the device name) and get the device ID and device secret. You'll need them in the next section.
Code
You Are Done
Access Lelylan Dashboard and control your connected light from mobile, tablet and desktop. If any problem occours, let @lelylan know.
Learn More
Nothing else to do. Everything should be up and running.
If you want to better understand how the code works checkout the code explenation code explenation section.