Hello again :)
I'm looking to take periodic measurements from an ultrasonic sensor to determine distance and automate based on that.
Is it possible to integrate an ultrasonic sensor like that here with your SW? https://www.amazon.co.uk/ELEGOO-Ultrasonic-Raspberry-Datasheet-Available/dp/B01M0QL1F1
Basically there is a trigger pin and echo pin, and I'm thinking I can use the powerpin setup to send a trigger pin, but I'm not sure how to read teh echo? Just thinking out loud here.
Any advice you can provide is greatly appreciated!
Thanks!
Hello There :)
The Sensor that you indicated is really basic, most of the implementation is left to the controller that should create the pulse and calculate the echo time.
The Raspberry is not really good at it especially for the very short pulses required of 20micro-seconds.
I think one option to make this Sensor more friendly to the Raspberry should be to insert an Arduino Nano in the middle, but then the Arduino will require some sort of protocol to speak with Raspberry.
Or you can use this one: https://www.dfrobot.com/product-1862.html
which has an analog output, so using the MCP3008 it is possible to read the analog input from the raspberry side. (As in my Automation board)