IoT 101 with Raspberry Pi and Azure Antonio Abalos Castillo @antonioabalos IoT 101 with Raspberry Pi and Azure
Our awesome sponsors! Please visit the sponsor area in the break and interact with them. They are the reason we can hold this conference free of charge!
Agenda
Raspberry overview Pi 1 launched in 2012 Pi 2 launched in 2014 Pi 3 launched in 2016 (quad core, HDMI, Wi-Fi and Bluetooth)
Raspberry models More info: http://socialcompare.com/en/comparison/raspberrypi-models-comparison
Raspberry 3 Model B IO Bus Screen (embedded) Micro SD card (storage) USB x4 Ethernet Power (Micro USB) HDMI Camera Sound
What else do I need? Power supply (2.5A) Class 10 micro SD card, 8GB or more USB keyboard USB mouse HDMI cable HDMI screen
Setup New out-of-the-box software (NOOBS) DHT22 sensor 4GB downloadable image (8GB or bigger micro SD card recommended) Based on Raspbian (Linux Debian) Includes Python, Java, some demos and office tools DHT22 sensor Connects directly to the GPIO
Wiring setup Raspberry Pi with DHT22
Setup
Demo 1
Demo 1 – From Raspberry to Power BI
Demo 1 – From Raspberry to Power BI Configure Power BI streaming datasets Prepare the development environment Download and customize scripts Switch on Create Power BI dashboard
Demo 1 – Power BI new streaming dataset Go to “Streaming datasets” and create a new one Choose “API” connection model Name the dataset and define the fields that will be sent over to Power BI Timestamp: DateTime Temperature: Number Humidity: Number Activate “historic data analysis” (provides more flexibility at no cost)
Demo 1 – Power BI new streaming dataset Get the “Push URL”
Demo 1 – Download libraries Download libraries for Python and the DHT22 BASH command prompt > sudo apt-get update > sudo apt-get install build-essential python-dev > git clone https://github.com/adafruit/Adafruit_Python_DHT.git > cd Adafruit_Python_DHT > sudo python setup.py install
Demo 1 – Download and run the script Download from: https://github.com/Azure-Samples/powerbi-python-iot-client/ Update code with: sensor type Pin REST_API_URL
Demo 1 – Run the script!!
Demo 2
Demo 2 – Key ideas to run in this way Real-time data does not always “look nice” Visualization is not enough, enable Analytics Detailed data is not always the best, but if we choose to aggregate it, we need to know what we are doing: When in doubt, save all data A SQL database can be up to 250GB at a low cost, a good deal!! It does not cost too much to run real-time data flows in Azure, unless there is a lot of data (gigabytes per day)
Demo 2 – From Raspberry to Azure
Demo 2 – Sample Power BI output
Demo 3?
Demo 3 - Plan
References Have no money? Online Raspberry simulator https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-raspberry-pi-web-simulator-get-started SD card format utility for Windows https://www.sdcard.org/downloads/formatter_4/eula_windows/ DHT22 https://www.adafruit.com/product/385 http://www.dx.com/no/p/dht22-2302-digital-temperature-and-humidity-sensor-module-184847 Power BI + DHT22 demo https://powerbi.microsoft.com/en-us/blog/using-power-bi-real-time-dashboards-to-display-iot-sensor-data-a-step-by-step-tutorial/
Our awesome sponsors! Please visit the sponsor area in the break and interact with them. They are the reason we can hold this conference free of charge!
Thank you! Enjoy the conference! Please complete the evaluation form handed out at the door, after the session. Your feedback will help us to improve future conferences and speakers will appreciate your feedback! Enjoy the conference!
The end