SEN0151 URM06 Pulse Ultrasonic Sensor With RaspberryPi
I want to use my SEN0151 URM06 Pulse Ultrasonic Sensor with RaspberryPi 3B+.
However, I couldn't write a proper python code that would make the sensor work correctly.
With the code I wrote below, the sensor stops after about 3-5 minutes. I couldn't understand why.
import RPi.GPIO as GPIO
from time import sleep
TRIG = 23
ECHO = 24
print ("dalga gonderildi")
pulse_start = 0
pulse_end = 0
pulse_start = time.time()
pulse_end = time.time()
pulse_duration = pulse_end - pulse_start
mesafe = pulse_duration*100000
I would like your help for a RaspberryPi code similar to the example arduino application in the link below.
Hi! Did you buy only one module? Does the same code work fine on another sensor?Tonny12138