parent
cef86c8499
commit
9fba01cbc3
6
test.py
6
test.py
|
@ -2,10 +2,10 @@ global GPIO
|
||||||
import RPi.GPIO as GPIO
|
import RPi.GPIO as GPIO
|
||||||
import time
|
import time
|
||||||
|
|
||||||
GPIO.setmode(GPIO.BCM)
|
GPIO.setmode(GPIO.BOARD)
|
||||||
|
|
||||||
GPIO_TRIGGER = 24
|
GPIO_TRIGGER = 18
|
||||||
GPIO_ECHO = 18
|
GPIO_ECHO = 24
|
||||||
GPIO.setup(GPIO_TRIGGER, GPIO.OUT)
|
GPIO.setup(GPIO_TRIGGER, GPIO.OUT)
|
||||||
GPIO.setup(GPIO_ECHO, GPIO.IN)
|
GPIO.setup(GPIO_ECHO, GPIO.IN)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue