I was always tempted to have a "smart home". Thanks to Instructables and Intel who sent me the kit consisting of Intel Edison with Arduino Board and Grove starter kit I finally have a chance to pursue this dream. This is the first step on my road to build my dream smart home solution. This is also my very first instructable. Prepare for more.
This build took me one evening of work and I know only basics of programming. IoT with Intel Edison is SO EASY!
Step 1: Assemble Edison!
First you have to attach your Edison to Arduino dev board. Guide it through mounting screws and press gently press it in place where you see white label.
Second - get base board from the Grove Starter Kit and put it in place on dev board.
At last - take one cable and temperature sensor from the Grove Starter Kit and connect it together to analog I/O, in my case A0.
Step 2: Prepare Intel IoT Analytics Dashboard.
Step 3: Set Up Edison.
Now I will guide you through setting up your Edison on Windows.
1. Download the FTDI driver and install it(run as administrator)
2. Download Edison drivers and install them.
3. Get 2 micro usb cables and connect them to Edison Arduino dev board and
your laptop. Make sure switch next to micro usb socket is switched toward it.
4. Download Putty - terminal emulator
5. Go to Device Manager in Windows and look under "Ports (COM and LPT)" which com number is assigned to your Intel Edison board (you will see i.e. USB Serial Port (COM7)).
6. Run Putty, and select serial, type COM7 in serial line and set speed to 115200. You will use it frequently so type in some name in "Saved Sessions" and hit save. Then you can hit open and you should see terminal window.
7. Hit enter few times - you should see command prompt asking you for user name. If it is not your first time with edison you can log in and skip next steps.
8. ...however if it is your first run - type in root as username and you should be in.
9. I strongly recommend you to update your Edison now using this guide.
10. After you updated Edison and logged back in - type in few commands.
Type in: "configure_edison" and hit enter, this should run a wizard which will guide you through.
Step 4: Configure IOT
- Assuming you still are in Intel Edison command prompt - type in "iotkit-admin device-id" and hit enter.
- Mark device id and copy it.
- Go to your IoT Analytics to My Devices panel and press "Add new device"
- Paste device id into fields ID and Gateway, give it some cool name and save.
- Now go to My Account panel, generate new activation code and make it visible.
- Go back to Edison command prompt and type in "iotkit-admin activate YOURACTIVATIONCODE"(substitute your code of course.
- Activate iotkit agent by entering the command:
systemctl start iotkit-agent
- Display catalog by entering: iotkit-admin catalog
- You can see there already "temperature" position, you have to register it by entering: iotkit-admin register temperature temperature.v1.0
- test if registration works by pushing some values to your cloud dashboard, type in:
iotkit-admin observation 12
iotkit-admin observation 13
iotkit-admin observation 14
- Now you should be able to see your observation in My charts panel when you select your device and catalog.
Step 5: Let's Get It Programmed!
In this step we will download and run intel arduino IDE and write some code to start this baby running.
- Download Arduino Software from this location.
- Extract and run it, no installation required.
- Go to tools->board and select edison
- Check in device manager which com port is assigned to "Intel Edison Virtual Com port", in my case it was COM8, you should select proper com port in arduino ide, go tools->Serial port.
- You are ready to code :-D
Here is my code, try to understand which line does what - it is best way to learn.
I hope this has been informative - any problem - let me know in comments.