loading

In this Instructable, I'll show you how to send temperature data to IoT Analytics server from Edison board. I've seen a ton of instructables explaining how to do it but most of them uses Arduino IDE. But if you want to use Intel XDK, then, there're not many resources. So, I thought it'd be a good idea to write an Intractable explaining how to do use XDK and ultimately send data to IoT Analytics server.

This intractable assumes that you've set-up serial terminal and were able to login to Edison board. If you haven't set-up serial terminal yet, you may refer Edison getting started guide

Let's get started!

Step 1: Connecting Edison to Computer

1. Connect both the Micro USB cables to your Mac/PC

2. Issue ls /dev/cu.usbserial-* command in terminal

3. You should see an ID. Mine looks like AJ035O96. Make a note of your Edison ID

4. Type screen /dev/cu.usbserial-your_edison_ID 115200 -L in Terminal and press Enter gently

(My command looks like screen /dev/cu.usbserial-AJ035O96 115200 -L)

5. If you see a blank white screen, press Enter twice

6. If you see an error message saying "Sorry, could not find a PTY", then, unplug your USB cable (J3) and plug it again. If you face the same problem even after doing that, change your USB

7. Login to your Edison. Default login ID is root

Step 2: Configuring Edison

1. Once you successfully logged into Edison, type configure_edison command and follow on-screen instructions

Important: Your computer and Edison SHOULD be connected to same network.

2. If you just want to configure Wi-Fi, then, you may type configure_edison --wifi

(You can check your IP address using ifconfig command)

3. Note down your IP address

Step 3: Intel XDK

1. If your device is not automatically detected, then select Manual Connection and enter IP address of your Edison. Login with your credentials

2. If you get an error saying "Timed out while waiting for handshake", then you're most likely connected to different router than your Edison. Switch to router to which Edison is connected.

3. Go to Templates -> LED Blink project and upload it.

Tip: Always STOP project that's currently running on Edison and then upload new project

4. Voila! You should see on-board LED blinking. Congratulations!

Step 4: IoT Analytics

Now, let's set-up IoT analytics account. Create an account here

1. Go to terminal and type iotkit-admin test

2. If it's not installed, then check this link out

3. Follow this link and set-up your account

4. Now, register a new catalog item

Register variables with Enable IoT


Type the following lines into the serial terminal to register the variables with the edison.

iotkit-admin register variable_name component_name.v.1.0

Eg. iotkit-admin register roomTemperature room.v1.0


To confirm that you've done everything properly, let's send a couple of values to cloud. In terminal window, type

iotkit-admin observation roomTemperature 28


You should be able to view this value in your account in Menu -> Charts

Step 5: Connections and Code

1. I'm using LM35 sensor for this project.

2. With flat side facing your face, connect +5V to first pin, GND to third pin. Connect the middle pin to A0

3. Download this project and upload the same to Edison

4. Boom! It's done! Finally! Congratulations! You should now see data from your Edison in IoT Analytics Server!

Should you face any problem, feel free to drop me a mail at teja.chintalapati@gmail.com or ping me on Whatsapp at +91-8792-355-512.

Happy hacking!

<p>Nice one</p>
<p>Interesting project.</p>
<p>I'm glad you liked it. :)</p>

About This Instructable

1,322views

20favorites

License:

More by tejaChintalapati:Smart Farming (Intel IoT) Sending Temperature Data To Intel Analytics - Intel XDK (Intel IoT) 
Add instructable to: