
DIY Microcontroller Projects for Hobbyists
By :

Before testing the distance meter, we will need to wire together the buzzer and the ultrasonic sensor to the SMT32 Blue Pill in the solderless breadboard. The following screenshot illustrates a complete circuit diagram including the STM32, ultrasonic sensor, and buzzer together in the solderless breadboard:
Figure 13.8 – Full circuit diagram of our social-distancing device
The following screenshot shows how everything should be connected in the actual system:
Figure 13.9 – The buzzer and ultrasonic sensor connections
Now, to complete the connection of the complete social-distancing device, we will need to write a new script combining the Chapter13/buzzer
and Chapter13/ultrasonic
scripts. The new script will be named Chapter13/distance_meter
. Follow these steps: