When I did some research on environmental monitors and tried to find some instruction on how to build your own devices, one of the most relevant question to me was: How to connect to the internet?
I have some experience on Arduino projects, I even have a WLAN shield for that. But I cannot really get it to work properly. In addition the power consumption was way too high for me, even using an Arduino Mini. But this is another topic and other people like hanscr are already working on that.
After a while I stumbled on a device called electric imp. The imp is pretty much an ARM microcontroller (I had to look this up ;-)) with a WiFi Adapter, plus it can even store some information, and has the size of an SD card.
The idea was to connect a moisture sensor, a temperature sensor, and a photo cell to the electric imp. In addition I wanted to turn on a LED based growth light (instruction on how to build it will be posted later). The data collected should be stored somewhere online and shown as graphs over time.
As of today I will start with a brief introduction to the electric imp. The hardware setup and the coding will be the topic of other posts.
So both imps arrived pretty quickly and the imp itself looks like an SD card (in white). So my first concern was on how can I connect to my encrypted WLAN or network without any user interface. The imp is exclusively programmed via web interface.
Before you start you have to initially commissioning an imp at www.electricimp.com. This post (as first post in a series) will describe the process on how to do so.
You basically have to go through the following steps:
- Get an account at www.electricimp.com
- Install the electric imp app on a mobile device (for iOS in my case, Android works as well, Windows mobile users – sorry :-()
- Connect the breakout board to your computer to power it up or connect it to a power supply using USB
- Enter the WLAN login information in you mobile app
- Connect the imp to the breakout board
- Flash the imp
Get an account at www.electricimp.com
On the start page click on sign in (top right corner) and on the following page click on sign up.
Provide the information required, agree to the Terms of Service, and click on “Go”.
Done and that it for now.
Install the electric imp app on a mobile device
Depending of the device your using just go to the appropriate app store and download the app (it is free).
Connect the breakout board
That was a bit tricky for me and a classic example of RTFM. The breakout board had no power, and I could not figure out why. After reading the documentation of the board I learned that you have to set a jumper correctly, so that the breakout board gets powered via USB. Change the jumper, and it can be powered via battery. No jumper (which is the case, when you unpack the breakout board) means no power to the imp.
So jumper is set correctly (see picture or go here) and the breakout board is powered up via USB in my case.
You do not need to put the imp in the reader slot yet – since it will wait 1 minute to flash the firmware, and you are not ready to do that yet.
Enter the WLAN login information in you mobile app
Fire up the mobile app, choose you WLAN encryption type and enter you WLAN credentials. If you like, you can tell the app to remember you password (I’m to paranoid for that).
Then stop here for the moment – you will be hitting the “Send BlinkUp” Button after finishing the next step.
Connect (push in) the imp with the breakout board
This works like a normal SD card slot (there is even a picture on the breakout board on which way the imp has to be pushed in). The LED in the imp should be flashing. That means that the device is ready for input. If you wait too long (more than 1 minute) the imp will be sleeping and you have re-eject the imp again.
Flash the imp
Press “Send BlinkUp” on you mobile app and hold the screen of your mobile device as close to the imp as you can. You will hear three beeps before the data transfer starts.
If everything worked correctly the LEDs in the imp should blink green.
Sometimes the light flashes of your mobile device are not recognized correctly. It helps to hold the device like shown on the picture below and to point the mobile device screen to the sensor on the edge of the imp.
To make sure it worked you login to http://electricimp.com/ again (if not already have) and your device should show up when you click on impees (a serial number for each device is displayed).
That’s it for now. Your imp is connecting to your WLAN and you are ready to code or to set up your hardware.
Let me know if this worked for you :-).
Until next time, reading part 2 of my tutorial!