A hands on workshop for an agrotech hackathon 🌽
This workshop is a hands on lab for building an AgroTech solution using Azure IoT.
Learn more, get certified
If you want to learn more about Azure IoT Services, then check out the following:
Once you have upskilled as an IoT developer, why not get certified with our upcoming AZ-220 Azure IoT Developer certification. Check out the details on our certification page
The final project that will be created is an internet connected device with environment sensors, that connects to a set of services that will store the telemetry data and predict the weather using Azure Maps. This weather prediction will be combined with soil moisture data, and used to send a signal back to the device to indicate if the plants need watering, and this will be indicated by an LED, lit if the plant needs watering.
Most of this implementation will use a no-code IoT platform called Azure IoT Central, an IoT Software-as-a-service (SaaS) platform. There will be some coding required for the connected device, and this will all be in Python.
Like all good IoT labs, you will need hardware to make this work. You will also need a plant to monitor.
A Raspberry Pi with an SD card and power supply, running Raspbian Lite.
Grove cables to connect the components
You will need to install some software to be able to program the Raspberry Pi and create the various parts of this app
Python
Windows:
You can install Python from the Windows Store. This configures Python correctly on your PATH, and there are no further steps.
If you don’t want to use the store, you can install from the Python Downloads page. If you do this, ensure you check the Add Python to PATH option.
macOS
You can install Python from the Python Downloads page.
When Python is installed it will open a Finder window. Run the following scripts from inside that Finder window to set up certificates and add Python to your PATH:
Update Shell Profile.command
Install Certificates.command
To use Azure services you will need an Azure subscription. If you don’t have a subscription you can sign up for free.
If you are a student aged 18 and up and have an email address from an academic institution, you can sign up for the free Azure for Students offer at azure.microsoft.com/free/students without a credit card. At the time of writing this gives you $100 of credit to use over 12 months, as well as free tiers of a number of services for that 12 months. At the end of the 12 months, if you are still a student you can renew and get another $100 in credit and 12 months of free services.
If you are not a student, you can sign up at azure.microsoft.com/free. You will need a credit card for verification purposes only, you will not be billed unless you decide to upgrade your account to a paid offering. At the time of writing the free account will give you US$200 of free credit to spend on what you like in the first 30 days, 12 months of free services, plus a load of services that have tiers that are always free.
Use Azure Stream Analytics to stream data into the storage account
Create an Azure Function triggered by Azure Stream Analytics to check soil moisture
Trigger an Azure IoT Central command if the soil moisture is too low
Call Azure Maps to check the weather forecast before sending the needs watering command