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
Ultrasonic sensor HC-SR04 on raspberry pi pico
-
- Posts: 12
- Joined: Wed Mar 20, 2019 11:25 am
-
- Posts: 12
- Joined: Wed Mar 20, 2019 11:25 am
Re: Ultrasonic sensor HC-SR04 on raspberry pi pico
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...