Pizza Delivery IoT Project Pt. 1
Introduction
There is an ongoing project each year for the Developer Advocates to build sample applications. This year my sample application is going to be built around an IoT use case. This project was the catalyst for my IoT for the .NET developer series here and on my YouTube channel. In this post, we are going to cover the initial setup for the project. I intend to provide blog posts and YouTube videos along the way to help you follow along.
Project Design
The project is designed around environmental sensors and IoT devices in the field. I wanted to build something that has some real-world use but also allows me to play around with some fun gadgets. The result is the “Pizza Delivery Temperature Monitor.”
The use case for my project is to provide a sensor that can be used to monitor the temperature and relative humidity of a package containing a pizza being delivered. The tracking device would periodically measure both environmental readings and then send them to a cloud-based solution. Once in the cloud, decisions can be made about the data in near-real-time and potential corrective action taken.
While I have framed my particular use case around pizza deliveries, the very same use case can be allied to a wide range of use cases where environmental control monitoring is important. Key examples of this would be the transportation of food and medical supplies like vaccines.
Equipment
My project is going to be set up around the use of some IoT equipment. I’ll be building the project out on a RasberryPi 4. The particular model that I am using is a 64-bit RaspberryPy 4.
https://www.amazon.com/gp/product/B0B5KHJZP9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
This unit is overkill for the specific use case, but it’s a convenient development device as it allows me to develop remotely and perform remote debugging. Once the primary development tasks are done, you would most likely look to deploy the finished solution on a smaller, less expensive, and lower-powered device.
I will include a DHT11 temperature and humidity sensor on the board. https://www.amazon.com/gp/product/B07WT2HJ4F/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
These devices are inexpensive and readily available.
I’ll finish off the first phase of the project with a red LED to serve as a warning light. This light will be triggered from the cloud when we detect that the temperature has fallen outside of the acceptable range for the shipment. Most IoT kits will include LEDs and the resister necessary to not burn out the LED.
It’s helpful to have a GPIO breakout kit for your RaspberryPi this will make constructing your circuits easier. Breakout kits usually include a solderless breadboard, as well as some jumper wires.
If you are purchasing a RaspberryPi for the project, some kits include the breakout kit along with some electronic components such as LEDs and resisters. If your kit does not include these electronic components, then you can find kits on Amazon.
Software
The RaspberryPi that I will be using for the project runs the default RaspberryPi OS. I will be installing .NET 7 on the device to run my code. I’ll be using Visual Studio Code for an IDE. All of this software is available at no charge.
For cloud services, I will be using AWS IoT Core to start. I haven’t fully decided on the set of AWS services that Il will be using for the solution; I expect that will evolve over the next few months as I build out the complete solution.
In order to interact with the General Purpose IO board on the Raspberry Pi, I will use the NuGet package “System.Device.Gpio.” And finally in order to interact with the sensors that I am using I will be using the NuGet package “Iot.Device.Bindings” This package contains code to interact with a range of common sensors for IoT devices.
Source Code
The full source code for the project currently lives on my public GitHub account. You can follow along here:
Subscribe to my newsletter
Read articles from Tom Moore directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Tom Moore
Tom Moore
I am an AWS Community Builder focused on Dev Tools. My goal is to help developers to understand the best ways to run their .NET applications in the cloud, and how to pick the best services to fit their use cases. I am available for in-person speaking events in the New England area, and virtual sessions worldwide. Opinions expressed on my blog are my own, and should not be considered to be the opinions of my employer.