Hello everyone. New to the forum so I apologise for anything I say that is incorrect.
Right now I’m using the HR-SC04 ultrasound sensor (the one with 2 big round sensors and the code works perfect for me but I want to use a much smaller sensor like the Sharp Digital Sensor or something equivalent. Unfortunately I don’t have any code that will work on a sharp sensor and I am terrible at coding. What I need is a servo motor to rotate 90* when the sensor detects an object about 3 to 5cm away and hold the position for 3 to 5 seconds and then return to its original servo position. It’s opening a tiny gate on my Christmas village. Can anyone help?