Page 1 of 1

Ultrasonic sensor HC-SR04 on raspberry pi pico

Posted: Thu Jul 01, 2021 7:10 am
by yuanyanhui
It doesn't work using GP6 and GP7 as trig and echo at the same time . Works for GP8 and GP9 and other pins. I used the following library.
https://github.com/rsc1975/micropython-hcsr04

Re: Ultrasonic sensor HC-SR04 on raspberry pi pico

Posted: Thu Jul 01, 2021 1:44 pm
by yuanyanhui
The problem seems to be that GP6 cannot be configured as trig. Using other pins as trig, the sensor works properly. The sensor also works fine with GP6 as echo. In the library code, GP6 is used as simple output. Strange thing is GP6 can be used as output to blink an led. I am confused...