Summary
What did we learn in this project? Firstly, we learned how to connect a piezoelectric buzzer to our Blue Pill microcontroller board and code a program to play an audible alarm. Then, we wrote a program to measure the distance between our electronic device and another object.
We also learned how to combine the two projects to create a social-distancing device that can be used to maintain a safe physical distance in this COVID-19 pandemic—for example, in schools, because children are more distracted and are more friendly and sociable.
It is important to remind you that this project is intended for learning purposes and should not be used as a primary alarm for preventing the risk of COVID-19 contagion in any circumstances. This is mainly because, at this time, we know that the main risk is airborne.
In the next chapter, we will learn to build a 20-second hand-washing timer.