I was one of the proud winners to receive the Intel IoT development kit. This kit included an Intel Edison and a Grove Starter Kit Plus.
In this instructables, I will build a simple ambient sensor which will upload the data to the cloud. The Ambient sensor consists of three sensors: sound, temperature and light. The sensors send updates of their value to the cloud. The system can be powered off and back on without the need to reconfigure the cloud settings (device-id problem). It automatically sets the device-id to the your default one and restarts the service which is required to upload data.
If there are errors in this instructable or if you have suggestions, please contact me asap. If I made spelling/grammatical errors, please excuse me for this.
Step 1: Step 1: What you'll need
This instructable assumes you've installed every other necessary software and flashed your Intel Edison. If this is not the case, please follow this link. The link leads to the Intel website were they explain it very well.
Step 2: Step 2: Configuring the Intel Edison
Use your favorite terminal, I use putty like almost everyone else. Select "Serial". In the "Serial Line" text box enter the correct COM port which you can find using your device manager. Look for "Intel Edison Virtual Com Port (COMX)" the COMX is the COM port which you'll need to enter in the text box, for me it's COM4. In the "Speed" textbox enter "115200" this is the bit rate, 115200 bits/s.
Let's configure it, you don't need to reconfigure your device! Only do this if you want to be sure your device is configured the same as my device in this instructable:
Above is the basic configuration which you already did when receiving your device. We'll continue with configuring the cloud part.
Your device is registered and activated to your account. Let's continue...
Step 3: Step 3: Register the Sensors
Now it's time to register our sensors to our Intel Edison. I will not register them using a terminal. I'm going to register them in my Arduino code. I assume you have correctly installed the iotkit library, you should be able to view the examples. I'm using code lines from the IoTkitRegisterExample sketch.
First of all you can find all the possible components in your Catalog which you can find on your IoT Analytics Dashboard. There are standard three sensors already registered:
We're going to make two additional sensors: the sound and light sensor.
You can review the sensors on the Catalog tabs. Or you can use the terminal and type iotkit-admin catalog this should bring up a table of all the sensors. Bellow you can find the IoTkitRegisterExample sketch. It's very well commented so read carefully and apply the changes. You'll have to replace YOUR_DEVICE_ID with your Device ID. Also, you'll have to replace the XXXXXXXX with your generated Activation code. Edit the register sensor part to meet your used sensors. Upload this modified sketch to your Arduino.
Step 4: Step 4: Final code
Attach the Grove Starter Kit Base Shield to your Intel Edison. Attach the sensors, display, button using the cables to the Base Shield:
Bellow you can download the code. The code is actually composed of different examples which were shipped with Grove Starter Kit and the IoTkit library. Don't forget to replace YOUR_DEVICE_ID with your device ID.
The data is updated every 2 seconds. The button is used to switch between the different information on your LCD screen. I used a little "hack" to make sure my device ID doesn't change from the original by setting it to the original value used to register and activate my device.
If you've got any questions, PM me or comment bellow.