ARTIK Cloud is a great tool for collecting sensor data over time. This project takes the Intel Edison IOT Edition with Grove Sensor kit and connects it to ARTIK Cloud to create a thermometer with sweet charts allowing you to view trends over time.
This project is a continuance of my Thermometer Project, and an adaptation of Monica Houston's Getting Started with ARTIK Cloud Project.
Let's get started!Set Up ARTIK Cloud
ARTIK Cloud, by Samsung, is an online tool that collects and displays IOT data over time. You will need to create an account by visiting https://developer.artik.cloud. Once you have that set up, you can access the Dashboard, and set up a Device Type.
- Click on Dashboard
- Under Device Types, click the [New +] Button
- Set the name to "Edison-Temperature" or similar
- Set the unique name to "com.yourname.edison_temp" or similar
- Cick on the [+ New Manifest] button
- Set the Field Name to "Temperature"
- Set Unit of Measurement to "F"
- Select Data Type "Double"
- Hit Save
There are no Device Actions, so just hit next, and then Activate Manifest.
Note here that your new Device Type is set for "Current plan is Hobbyist". This plan will only store 150 messages a day, so, for this project, change it to the Growth option. This is still free for one device, so you are ok!
Now let's go over to My ARTIK Cloud and actually connect our edison up to ARTIK Cloud -
- Click on [+ Connect another device...]
- Search for "Edison-Temperature" or whatever you called your Device type in the previous section, and click the [Connect Device...] button
- Now click the configuration gear next to your new device
- In the Device Info popup, you need to create a token. Once you done this, you can note your Device ID and Device Token which we will use in the Edison program to authenticate to ARTIK.
Don't worry, I deleted this device, so you can have the device ID and device token that no longer exist! But you should note your id and token, as you will need it soon.
Go ahead and click Save Changes. Click on your device name, and note that if you add a chart for it, you will get "NO DATA TO DISPLAY". Alright. Let's get some data flowing!Wire up your Edison
Wiring up your Edison is easy with the Grove starter kit. Simply plug in the grove shield, display and sensor -
- Connect the Grove Shield to the Edison dev board
- Connect the Display to any I2C port
- Connect the temperature sensor to Analog port A0
Fire up your Intel XDK and let's move on to programming
(If you would like more detail of this process, please seem my Intel Edison Thermometer project.)Program the Edison
First let's add the library you need to message using MQTT. The Library is called mqtt. Simply access your shell prompt on your Edison from the Serial Terminal or SSH terminal, and type:
npm install mqtt
From the XDK start a new blank project, and paste in the node.js code that is in the code section of this project. Note that you will need to change the Device ID and Token as noted in the previous Set Up ARTIK secion above. You can access this by going to My ARTIK Cloud > Devices, and clicking on the configure gear. cut and paste your DEVICE ID and DEVICE TOKEN into the code at the appropriate location:
Upload your code to your Edison, and click the green run button. You should see Temperature data in the console window, and data on the LCD display
Note that the console window shows MQTT connecting to ARTIK. If you don't see this, you may have the wrong DEVICE ID or DEVICE TOKEN. Check that! Also, your Edison, of course, needs to be connected to the Internet!Access ARTIK Chart
Great! One more step - Check your data out on ARTIK!
Access your My ARTIK Cloud devics and select your Edison-Temperature device. Click the [+/- Charts] button, and check the Edison-Temperature Temperature field. Now click the play button on the right and explore your data!
Awesome! You have just connected an IOT device to the Cloud!Next Steps
With this platform, think about what else you could do -
- Use a different sensor
- Set up an array of sensors and compare them to each other - How about Light versus Temperature?
- Explore ARTIK Device Actions
Did you make this project? Let us know! Did you make a new project based on this? Be sure to share it on Hackster.io!