In this video I explore the HC-SR04 Ultrasonic Range Sensor. Connecting this to a Raspberry PI Pico.
I look at two code strategies for working with the HC-SR04: using Interrupts to calculate the echo time and using PIO to do this. I got carried away a little with exploring these devices and decided to try to use four of them in parallel. This uses up a lot of the GPIO pads, so I wondered if we could combine the trigger. Watch the video to see if this works.
All of the source code for this experiment is included in the GitHub Repo.
For the PIO integration, I also use an excellent library by Daniel Garcia-Briseno which can be found here.
