As part of the Intel® IoT Roadshow, our team used Intel Edison, Amazon Echo, and a sense of humor to create a program to give updates about cooking a turkey.
Step 1: Step 1: Setting Up the Intel Edison
Here's instructions for Mac.
1. Snap the Edison chip onto the board.
2. Screw in the legs
3. Snap the Ardunio shield to the board.
4. Download Intel's Flash Tool Lite to flash the Edison.
5. Enter the Edison shell using terminal
type 'screen /dev/cu.usbs', tab to get the device name, then type '115200 -L'.
$ screen /dev/cu.usbserial-XXXXXX 115200 -L
hit Enter twice.
6. Configure the Edison in the Edison shell
root@edison_name:~# configure_edison --setup
a. optional to set a password
b. give your Edison a unique name
c. setup the wifi by scanning, then entering in the number of network.
d. copy down the ip address
7. Update MRAA in the Edison shell
root@edison_name:~# echo "src mraa-upm http://iotdk.intel.com/repos/1.1/intelgalactic" > /etc/opkg/mraa-upm.conf
root@edison_name:~# opkg update
root@edison_name:~# opkg upgrade
Step 2: Step 2: Connecting the Sensors
There three types of sensors on the Ardunio board.
A - analogs
D - digital GIPO
I2C - advance sensors
Make sure you plug the sensors into the right type of ports.
Visit Edison sensors list for instructions and code samples for various sensors.
We got the code for the buzzer, IR temperature sensor, flame sensor, air quality sensor, and LCD from the Intel site. We setup a setInterval callback function that would collect the sensor data and send the data to the api every few seconds.
You can see the code at Meat Sense github
Step 3: Azure Web Site Deployment
In order to to collect data from the Intel Edison sensors and interact with Amazon's Alexa service we'll need to publish a web service up in the cloud. We'll be using Azure Web app to do this in an ASP.NET 5 backend.
The backend will have two resource endpoints: /api/sensors and /api/alexa. The sensors endpoint will be used by the Intel Edison to upload sensor values from the oven while the Alexa endpoint will be used by Amazon's Alexa service to send us user voice interactions from the Amazon echo.
When the Intel Edison posts it's sensor values it'll be saved into a document store on Azure. The backend will then use these values when the user is interacting with the Amazon Echo through voice to give appropriate responses.
Step 4: Alexa Service Setup
Meat Sense uses the Amazon Echo in connection with Amazon's Alexa Skills Kit (ASK) to power it's voice interaction features. The way you develop and interact with Alexa is through registering a skill on the Amazon developer portal and standing up a backend HTTP service to handle the voice interactions.
When a user starts speaking to the Echo the Amazon Alexa service will handle parsing what the user said and pass that along to your web service using an HTTP POST to the backend service. From there the backend will pass back a response that the Echo will say back to the user.
To register a an Alexa skill on the Amazon developer console you'll need to define a skill name which the Alexa service uses to associate the current voice interaction with your service. You'll also need to define a skill intent which is what the Alexa service uses to parse the voice interaction for you skill. Intents typically use the following patterns:
Alexa, ask [skill name] [question]
Alexa, tell [skill name] [action]
In the case of Meat Sense, the backend will be using the sensor data from the Intel Edison to answer the question of "how's my meat?" The temperature from IR temperature sensor is used to determine when the meat's done by reading it's object temperature while the air quality sensor is used to detect when the meat is starting to burn.