IoT Data Connect 201: Build a sample asset
Complete this lab to prepare an asset that generates sensor data and connect it to an IoT Data Connect-ready gateway. You can then use the Freeboard data visualization dashboard to display and visualize that data (see the Learning Lab IoT Data Connect 301).
Completion Time: 30 minutes
- Generate sensor data from a Raspberry Pi.
- Connect the Raspberry Pi to a gateway.
- Associate the gateway and Raspberry Pi with your IoT Data Connect organization.
- A Cisco IR809 or IR829 gateway that has been preconfigured by your Cisco IoT Data Connect Product Manager. Write down the serial number, which is required to complete this lab.
- A Raspberry Pi 3 Model B with Sense HAT board and a preconfigured gateway. These devices are included in your Developer Kit.
- A monitor that supports HDMI
- An HDMI cable to connect the Raspberry Pi to the monitor
- A USB keyboard
- A USB mouse
- A USB Micro cable to power the Raspberry Pi
Step 1: Prepare your Raspberry Pi
The Raspberry Pi requires an application that reads the sensor data from the Sense HAT module. Sensor data includes temperature, humidity, barometer, and gyroscope (yaw, pitch, roll).
An edge application installed on the gateway polls the Raspberry Pi for the sensor data (via HTTP). A Flask web server on the Raspberry Pi provides that data to the edge application on the gateway.
Connect the Sense HAT board to the Raspberry Pi.
Install the required Raspian Jesse code on your Raspberry Pi, if not already installed.
Connect the Raspberry Pi Ethernet port to the local Ethernet network that has connectivity to the Internet.
Test the Pi's connectivity to GitHub using the CLI.
Set the correct date and time on your Raspberry Pi.
date -s 'YYYY-MM-DD hh:mm:ss'
Download the client application from GitHub onto the Raspberry Pi.
git clone https://github.com/CiscoDevNet/iot-developer-demo-kit-python/tree/master/Pi_senseHat