Skip to main content

Simple IOT Project - Electric Imp Led Light Controller

Recently I went to IBM IOT Hackathon and got Electic IMP device and thought of playing with it and this is the first application I created LED Light controller using Electric IMP device and REST webservice.


Skill Level: Beginner

Below are detailed steps on how to connect an Electric Imp with environmental sensors to the Watson IoT Platform in order to visualize and monitor your refrigerator in real time.


  1.   Your WIFI *network name* and *password*
  2.  A computer with a web browser
  3.  Smartphone with the Electric Imp app IOS or Android
  4. A free Electric Imp developer account 
  5.  An Electric Imp Explorer kit - purchase from Amazon 
  6.  Three AA batteries


Step 1 - What is demonstrated in this example?

Use an Electric Imp to switch on/off light sensor and change the color of light using combination of RGB.

 Step 2 - Connect your Electric Imp to the Internet

 Set Up Hardware

  •  Plug the Imp001 into the Explorer Kit Board
  • .Power up your Imp with the AA batteries.

When the imp is first powered on it will blink amber/red.

 Electric Imp BlinkUp

Use the Electric Imp mobile app to BlinkUp your device
  1.  In the app log into your Electric Imp developer account
  2.  Enter your WIFI credentials
  3.  Follow the instructions in the app to BlinkUp your device
  4. When BlinkUp is successful the imp will blink green and the app will show you the device's unique ID.

For more information on BlinkUp visit the Electric Imp Dev Center 

Step 3 - Connect your Electric Imp

In your web browser log into the [Electric Imp IDE]( using your Electric Imp developer account.

Click the **+** button to create a new model

In the pop-up enter the following information:
  1.  A name for your code model (ie LED Smart Light)
  2.  Select the checkbox next to your device ID, this assigns your device to this code model
  3.  Click **Create Model** button

Copy and paste the  code into the agent and device coding windows.  The agent.nut file should go in the agent coding window, the device.nut file in the device coding window.

Click **Build and Run** to save and launch the code

STEP 4 - Testing the application

  1.  I have used POSTMAN application to make calls. You can use any browser
  2.  Once you run the application, you will get a url on the console like
  3.  The led=1 indicates to switch on the light and led =0 indicates switch off the light.
  4. Enter the desired combination on parameters rgb to get light. For more details on RGB Wikepedia-RGB and to get the color codes RGB COLOR CODES

STEP 5 - Demonstration of the application


Blue Color LED

You can change r,g,b value to get different color light.




Create a mobile app where user can select the color and change the color of the led as well as switch on and switch off the light


  1. Nice article want to share it with team.

  2. This article provided me with a lot of useful information about Led Floodlights. The material you presented during this post provided me with some excellent information. Continue to post.

  3. I found one successful example of this truth through this blog. I am going to use such information now. New York Neon Sign

  4. Slot Machines Near Me - Mapyro
    Hotels near 사천 출장샵 Slot 평택 출장마사지 Machines Near Me - Mapyro - 경상남도 출장안마 Find Hotels with the Best Rate on Mapyro - Hotels. 용인 출장샵 A.S. Casino - Hotels. Find 양주 출장샵 Hotels with the Best Rates on Mapyro - Hotels.


Post a Comment

Popular posts from this blog

Adding loading spinner to JSP Page using pure CSS and JS

I wanted to add loading spinner to the web application that I was working on. This application is a legacy application and I was looking into a way to add the loading spinner whenever the user performs certain actions such as the following Clicks a button which behind the scene performs CRUD operation When user request data  As the web application was based of JSP and I was looking for a way to adding it to the webpage and finally came across the following solution  Create a div  Add the CSS for the div Create a JS function which gets called on button click.  Here is the code HTML JS      CSS

Enabling TLS 1.2 in Java 7

I am working on web application that uses third party API and apparently those guys have stopped using TLS 1.0 and switched TLS 1.2 I was getting the following error Apparently Java 1.8 have TLS 1.2 by default and for Java 1.7 you have to enable it. I have been searching online for few days to enable TLS 1.2. I have tried all the following things but it did not work For each application, enter this command: java ... -Dhttps.protocols=TLSv1.1,TLSv1.2 ... Using JAVA_OPTS, enter the following command in your .profile, shell rc (to affect all Java programs run by the user), or (to just affect Datameer): export JAVA_OPTS="${JAVA_OPTS} -Dhttps.protocols=TLSv1.1,TLSv1.2" This is what I did and boom it worked