Running two ultrasound detections independently on one ESP32
Posted: Sun Dec 13, 2020 10:16 am
Hi all,
I have a question on using two HC-SR04s independently.
Our University has two doors and we want to count people going in and out. Doing one door is rather easy with two HC-SR04s sensing distance change and checking the millis when this occurred, and that is no problem to decipher which direction the person went.
But when I try to think of a way of running two such dual HC-SR04s so as to have one device manage both doors, I seem to run aground when I try to think of them operating independently so that both sensing units could be detecting at the some time. Parallel loops don't seem readily available in C.
Is Python a better choice for this?
Thanks for your time.
I have a question on using two HC-SR04s independently.
Our University has two doors and we want to count people going in and out. Doing one door is rather easy with two HC-SR04s sensing distance change and checking the millis when this occurred, and that is no problem to decipher which direction the person went.
But when I try to think of a way of running two such dual HC-SR04s so as to have one device manage both doors, I seem to run aground when I try to think of them operating independently so that both sensing units could be detecting at the some time. Parallel loops don't seem readily available in C.
Is Python a better choice for this?
Thanks for your time.