Azure IoT Projects
Uses arduino mkr1000 and supersonic sensor to measure standing desk height, sending information to Azure IoT Hub and visualizing it in a real-time Dashboard (Python application backend and Pusher/Javascript frontend).
It also detects state changes (sitting -> standing and standing -> sitting) and logs them in a table.
Arduino project setup is available in this link:
https://www.hackster.io/vmehmeri/quantified-desk-iot-6647bf
As a pre-requisite, an Azure IoT Hub must be setup and configured to route device messages to an Azure Service Bus queue. Your Arduino device will also require SSL certificates for connecting to the IoT Hub endpoint.
-
Instructions for setting up Azure IoT Hub: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-create-through-portal
-
Instructions for creating a Service Bus Queue: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-portal
-
Instructions for updating Firmware and adding SSL certificate to device: https://www.arduino.cc/en/Tutorial/FirmwareUpdater
Configure your IoT Hub message routing under Messaging > Messaging routing > Add (then select your queue)
- azure-servicebus
- pusher
- pusher
- flask
All can be installed with pip
- Ultrasonic
- WiFi101
- RTCZero
- WiFiUdp
All those libraries are already available in Arduino Web Editor. The latest code can also be accessed as a Web Editor sketch through the link below:
First configure your connection details in
Start frontend
python frontend/app.py
On a separate terminal, start backend
python device_handler.py
Both frontend and backend can run in any computer with access to the Azure URLs.