Skip to content

jimbobbennett/AgroHack

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Getting started

Hardware requirements

Like all good IoT labs, you will need hardware to make this work. You will also need a plant to monitor.

The environment sensor

Software

You will need to install some software to be able to program the Raspberry Pi and create the various parts of this app

  • Visual Studio Code

  • Azure Functions Core Tools

  • 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.

      The python installer dialog highlighting the Add Python 3.8 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:

      1. Update Shell Profile.command

      2. Install Certificates.command

Azure subscription

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.

The workshop

Steps

  1. Set up the environment monitor

  2. Create the application in Azure IoT Central

  3. Write the code to capture telemetry from the Raspberry Pi

  4. Export IoT telemetry to Azure Event Hubs

  5. Create a storage account to store telemetry data

  6. Use Azure Stream Analytics to stream data into the storage account

  7. Create an Azure Function triggered by Azure Stream Analytics to check soil moisture

  8. Trigger an Azure IoT Central command if the soil moisture is too low

  9. Call Azure Maps to check the weather forecast before sending the needs watering command

  10. Summary

  11. Clean up

About

A hands on workshop for an agrotech hackathon 🌽

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages