- Azure Subscription
- Raspberry Pi
- GrovePi
Please refer to the following guide to deploy the Azure Infrastructure.
Please refer to following guide to deploy the required function apps used in this sample.
Once the Azure Infrastructure has been deployed, open the Twitter Stream Analytics Job and paste in the Azure Stream Analytics query from here
The sensor data stream from your Raspberry Pi will contain individual data points as well as the unique device id for your device. To be able to enrich your stream with additional information, e.g. a friendly device name, please navigate to your storage account and to the referencedata blob container. In this container, please copy in an updated version of the reference_data.json
[
{
"devideId" : "00000000eb12345",
"deviceName" : "John's Raspberry PI"
}]
So you're ready to start streaming data from a Raspberry PI to the cloud? Great! The following guide below outlines the steps neccessary to achieve this.
Start and log in to your Raspberry Pi, followed by executing the following command to update all and any packages.
$ sudo apt-get update
Install the package for GrovevPi's firmware.
$ sudo curl -kL dexterindustries.com/update_grovepi | bash
$ sudo reboot
You may need to update the firmware for the GrovePi. If so, please connect the GrovePi to your Raspberry PI and run the following commands:
$ cd /home/pi/Dexter/GrovePi/Firmware
$ bash firmware_update.sh
This repo utilized an Azure python package to communicate with an Azure EventHub.
$ pip install azure
- Connect your GrovePi to your Raspberry PI
- Connect the temperature sensor to port digital D7
- Connect the sound sensor to analog port A0
- Connect the light sensor to analog port A1
- Connect the ultra-sonic range sensor to digital port D4
Download stream_raspberrypi_sensors.py
Update the script with configuration data for your Azure Event Hub. In a command shell, navigate to the directory of the script and run
$ sudo python stream_raspberrypi_sensors_to_azure.py
Please refer to the following guide setting a Power BI dashboard and a streaming dataset