Skip to content

Commit

Permalink
Update ultrasonic sensor with led.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharatpathak08 authored Apr 6, 2023
1 parent ca5167e commit b9344fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ultrasonic sensor with led.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setup(17,GPIO.OUT)
GPIO.setup(18,GPIO.IN)
GPIO.setup(2,GPIO.OUT)

stop=0

while True:
GPIO.output(17,False)
time.sleep(0.5)
Expand All @@ -29,4 +32,4 @@
GPIO.output(2,GPIO.HIGH)
else:
GPIO.output(2,GPIO.LOW)
# print(f"distance:{distance}")
# print(f"distance:{distance}")

0 comments on commit b9344fe

Please sign in to comment.