loading

Hi There everyone!

It's been a long time since I posted anything on here, and I thought the new Intel IoT release would be a great idea to create a instructable.

So - What is IoT?

IoT stands for "Internet of Things" which is a development of the "Internet" where it is planned for every device to have network connectivity thus allowing them to send and receive data.

This could be a device such as your fridge and it has the ability to save a shopping list to google drive every week or could be a child tracking device in a shoe or accessory to help parents keep control of their kids in shopping centres etc.

This is the definition of IoT :

"The Internet of Things (IoT) is a computing concept that describes a future where everyday physical objects will be connected to the Internet and be able to identify themselves to other devices. The term is closely identified with RFID as the method of communication, although it also may include other sensor technologies, wireless technologies or QR codes.

The IoT is significant because an object that can represent itself digitally becomes something greater than the object by itself. No longer does the object relate just to you, but is now connected to surrounding objects and database data. When many objects act in unison, they are known as having "ambient intelligence." "

What is Intel doing to get in on this?

Intel have released a Intel IoT Developer kit that you can get to help developers and techies to get their hands on a simple piece of kit and start developing applications for use in the everyday world.

There are two products available, which are :

Intel Galileo

Intel Edison

A while back I applied to get my hands on one of these kits, it was a random selection of what you got.

The Galileo is an all in one board, similar to the Raspberry Pi. It has a ethernet port and several output pins so you can program it to do certain functions.

The Edison is the more interesting one (in my opinion). It is a tiny little chip that contains all the important bits, such as the CPU and RAM. The idea behind this is that the computing power that is provided (2 cores, 1GB ram) is useful for a lot of applications and can easily run most projects in a realistic time and environment. The chip is about the size of a SD card, you could easily fit that into a dog collar, shoe or even a watch!

The Edison comes with an arduino breakout board that allows you to plug in modules and sensors, just like an arduino and expand the devices capabilities.

Which one did I get?

I received the Edison and the Arduino breakout board, which came along with a Seeedstudio Grove Starter Kit Plus (Gen 2)

I took it all out of the box and this is what I got :

1* Intel Edison Chip

1* Intel Arduino Breakout Board

1 * Ethernet Cable

1* Micro Usb Cable

1* USB to FTDI cable

10* connector cables

4* Mounting posts

1* Mini Servo

1* pack of 3* LED's (Red,Green and Blue)

1* PP3 to DC jack lead

1* Arduino base shield V2

1* Rotary Angle Sensor

1* Temp sensor

1* Magnetic Switch

1* Light Sensor

1* Sound Sensor

1* Touch Sensor

1* Relay

1* Switch

1* Button

1* LED board

1* 16*2 RGB Display

1* 8GB MicroSD and SD card adaptor

Awesome eh?


Head over to the next step to get stuck in!

Step 1: Time to Get Set Up

Time to get started with your board,

I'm assuming you have the Intel Edison and Arduino breakout board for this instructable.

First of all, UNBOX ALL THE THINGS

you should have all of the things I mentioned earlier, if not you should have some similar items to tinker with.

To get started I recommend that you follow this guide :

https://communities.intel.com/docs/DOC-23147

You won't need to connect your board to wifi for this guide, but I suggest you do for future projects and tinkering. Once set up and hopefully working you will need to add the Base shield to the board in order to be able to add the sensors to the edison.

The base shield is the one under the LCD in the seeed-studio box. You don't have to turn the edison off to add the shield, but as the edison is a sensitive device I suggest that you do turn it off before you add it,

Once added it should look something like this:

oooohhhhh connectors!!!

Now you need to get a few things out of the seeedstudio box, in particular you need the following:

1* Grove-LCD RGB Display

1* Temperature Sensor

2* Connector Cables

It should be pretty easy to connect the cables up to the Edison, Connect the temp sensor to the port labelled A0 and the LCD to the I2C on the left hand side of the board.

I would also suggest that you do this when the board is off.

Once connected you're almost good to go!

Head to the next step for more!

Step 2: Connect to Arduino IDE

Next up,

Connect your board to the IDE

You will need to download the arduino ide from here if you haven't got it already, when it has finished downloading just extract it to your desktop.

After this you will need to download the sketchbook starter kit from github (here) or a zip file of it from here

you will want to extract this to a folder within the arduino ide folder from earlier, it doesn't affect the way it works, it just stops files from spreading everywhere.

Open the folder that you just downloaded and go to the folder called libraries, inside there will be a folder called "Grove_LCD_RGB_Backlight" copy this into the libraries folder in the root of the arduino folder (Something like arduino-1.5.3-Intel.1.0.4\libraries)

Then launch the arduino IDE (double click the arduino.exe in the root folder), it should look a little like this:


The contents in your window will look a little different, my screenshot is only like this because I have one of the demo scripts open.

To help you along with things you can add the demos from Groove as a sketchbook, to do this you need to do the following:

1. Click File

2. Click Preferences

3. Change the sketchbook location to where you put the extracted zip / github clone within the arduino ide.

Should look something like this:

Where my username is robert, just change it to your username, or browse to the file path where you saved them.

4. Click OK

Now when you go to file --> sketchbook it should list some examples, such as grove_Button

This just helps you to get your head round the code that is put together to run applications on the Edison.

Now to check the arduino IDE is talking to the Edison,

Go to tools, then click on board, check that Intel Edison is checked.

Then go to tools, serial port and select the serial port that you used when setting up the board, if you can't remember just do:

Start, type devicemgr.msc then click the little arrow next to COM ports, and look what the Edison Board is listed as.

Once done you can go to file, New and you will be all ready to go!

Head to the next step for more!

Step 3: Writing the Code

Nearly there!

Now you have the Edison board set up and talking to the arduino IDE it is time to add the code.

you can download my code for the Temp sensor display here

Here is the code so you can see it:

//Ainsey11
//Shows Temperature on LCD display
//Website Ainsey11.com
//Version 1.0
//12-13-2014
//Feel free to pinch and tweak this code to whatever you want

#include <Wire.h>
#include "rgb_lcd.h"


const int pinTemp = A0;      // pin of temperature sensor, usually A0-A4

float temperature;
int B=3975;                
float resistance;

rgb_lcd lcd;

void setup()
{
  
    lcd.begin(16, 2);		//Sets the LCD screen config, 16chars,2 lines
    
}

void loop()
{
    int val = analogRead(pinTemp);                               // get analog value
    resistance=(float)(1023-val)*10000/val;                      // get resistance
    temperature=1/(log(resistance/10000)/B+1/298.15)-273.15;     // calc temperature
    lcd.print("It is ");					 // Print "it is" on the screen
    lcd.print(temperature);					 // Print the final temperature
    lcd.print(" *C");						 // Add *c on the End
    
    
    delay(1000);          // delay 1s
    lcd.clear();						//Clear the screen and loop
    
}

I'll talk you through the code,

anything with a "//" next to is is a comment, this just makes it easier to read and work out what other people have done. It is always a good idea to comment your code.

The next bit down is :

#include <Wire.h>
#include "rgb_lcd.h"

This loads the libraries that we copied over earlier. these contain set functions and commands to send to the Edison

After this comes :

const int pinTemp = A0;    

This is to let the board know what pins to look on for the temperature sensor, in my case I connected it to A0. You could choose A0,A1,A2 and A3 for this.

The next important bit of code is this:

void setup()
{
  
    lcd.begin(16, 2);		//Sets the LCD screen config, 16chars,2 lines
    
}

This, as mentioned in the comment sets the screen size, so when we print out data to it we don't go off the edge.

void loop()
{
    int val = analogRead(pinTemp);                               // get analog value
    resistance=(float)(1023-val)*10000/val;                      // get resistance
    temperature=1/(log(resistance/10000)/B+1/298.15)-273.15;     // calc temperature
    lcd.print("It is ");					 // Print "it is" on the screen
    lcd.print(temperature);					 // Print the final temperature
    lcd.print(" *C");						 // Add *c on the End
    
    
    delay(1000);          // delay 1s
    lcd.clear();						//Clear the screen and loop
    
}

This is the final loop of code, as mentioned in the comments it reads the value of the sensor, gets the resistance of the sensor, calculates the correct temperature then prints it onto the screen.

Step 4: Sending to the Edison

Code compiled!

Time to send it to the board.

Just click the little right facing arrow at the top of the IDE and it will send the code across.

When it has done there will be a message at the bottom of the IDE saying "Transfer completed"

If you have followed all the steps right your LCD connected to the should spring to life and display the current temperature in C's

Here is a little video of the end result :

Step 5: Finishing Up

Well,

This is the end of my first 'ible for a long, long time.

I hope you all enjoyed reading through it and learning your way around the Intel Edison and the Arduino boards, There are a lot of things you can do with these kits, I made this in one afternoon!

I plan to add some colour changes to the lcd screen so it changes colour depending on the temperature and maybe take advantage of Intel's logging dashboard to make graphs of the temp sensor,

This is just the start for me and I plan to make many more guides on the Intel Edison

Happy Tinkering!!!!

- Ainsey11

(you can see my website at https://ainsey11.com)

<p>AH-MAZE-ZING! Thanks for sharing this project with us!!!</p><p>Cheers!</p><p>Audrey</p>
<p>Thanks Audrey!</p><p>Hopefully some more coming soon!</p>
<p>Thank you for this instructable. </p><p>Could you kindly tell me how do I write this temperature data on the console of my Ubuntu PC ?</p>
<p>Hi KBZ,</p><p>you could ssh to the edison to view it, or you could get it to log to a small file and read that from your PC</p><p>OR you could get it to write to an IoT dashboard or create youur own web server code on the edison to serve the data</p>
<p>Thanks ainsey11. </p><p>I am able to ssh and read the temp data from there. My set up is something like this: Intel Edison connected over serial cable to my laptop(ubuntu), and this laptop will be connected to another laptop/server. I would like to send the temperature data that I see when I ssh into the edison to this server from my laptop over an ethernet cable. </p><p>How can I do that? I tried some linux commands to convert the serial data to tcp data, but I get garbage value, which kind of makes sense as the data that I am getting is not my laptop, rather on the edison itself. </p><p>Kindly help me out with this. Thanks. </p>
<p>Have you tried to send the temp info over bluetooth or wifi?</p>
<p>Hi there,</p><p>I haven't touched my edison in a while I'm afraid, so I haven't tried to send the data externally yet, I suspect it will be possible but I'm not sure how to integrate it with my project</p>
<p>What if I need to do the same with GPIO Block fir Edison OR Mini Breakout Kit?</p>
You would need to get a temperature sensor and connect the signal pin into one of the reader pins on the edison so you can read the value of it, All the Grove parts that I use do that, just with pre-built connector. <br>Theres a great picture here of what the pins do: http://fab-lab.eu/wp-content/uploads/2014/10/Edison_IO_LED-300x225.jpg<br><br>Try connecting one of the sensors to GPIO46 then read the value from the edison and providing you have the wiring right and the code right it should return a value that you can use, also with temp connectors- as they're serial - you can daisy chain them. This means that you can have several sensors connecting onto one pin on the edison. <br><br>Hope that helps!<br><br>-Ainsey11
<p>Yes, it helped. Thanks. Do you have any idea about GPIO Block for Intel Edison?</p>
<p>by the looks of the pinouts, it would be a similar thing, connect the sensors to the GP46 pin (for example)</p>
<p>Thank you so much for your precious guidance, ainsey11... Will contact you if I stuck somewhere</p>
<p>Hi there!</p><p>I tried running the however I'm getting an error something about Linux, are you using Linux as your operating system? Do you have a code that would work for windows?</p><p>I copied the error message. Can you please advise.</p><p>Thanks, </p><p>Anthony </p><p>Arduino: 1.5.3-Intel.1.0.4 (Windows 7), Board: &quot;Intel&reg; Edison&quot;<br><br>i586-poky-linux-g++: error: files\arduino-1.5.3-Intel.1.0.4/hardware/tools/edison/sysroots/core2-32-poky-linux: No such file or directory<br><br> This report would have more information with<br> &quot;Show verbose output during compilation&quot;<br> enabled in File &gt; Preferences.</p>
<p>Hi Anthony!</p><p>I'm using windows 7 as my OS and the arduino IDE editor, </p><p>The arduino editor uses some linux packages due to the edison being based on linux, this error is usually shows up if the IDE was corrupted when extracting, </p><p>Try downloading the arduino ide from here : <a href="https://downloadcenter.intel.com/download/24782" rel="nofollow">https://downloadcenter.intel.com/download/24782</a></p><p>there is some more suggestions about this error over at : <a href="https://communities.intel.com/message/267565" rel="nofollow">https://communities.intel.com/message/267565</a></p><p>Hope that helps!</p><p>- Ainsey11 </p>
Thanks for your answer ainsey11. I know this board will have much to talk.
What if I like connect this project to wifi to look the temperature remotely.
<p>Hey there,</p><p>Apologies for not getting back to you sooner, </p><p>You could make use of Intels dashboard and get the sensor to write to that, there is a good guide that explains how to get set up here : <a href="https://www.instructables.com/id/Intel-IoT-Analytics-Dashboard/step5/Set-up-WiFi/" rel="nofollow">https://www.instructables.com/id/Intel-IoT-Analytic...</a></p><p>If you wanted to have a quick way of doing it you could substitute the code where I have got lcd.print(temperature) with an echo, then you could SSH in using putty and it would echo into the shell, not great but its a way.</p><p>I recommend following th 'ible I put above, it explains the dashboard and even runs a example with the temperature sensor</p><p>Hope that helps,</p><p>Thanks,</p><p>Ainsey11</p>
I just got the same kit!! Thanks instructables!!!

About This Instructable

13,737views

61favorites

License:

Bio: I love tinkering, getting my hands on new gadgets and code. I'll never stop tinkering!!!
More by ainsey11:Intel Edison Temperature controlled Relay Intel Edison Live Temperature Display Deodorant candle 
Add instructable to: