parent
719f7bf6b9
commit
82f31454d6
4
main.py
4
main.py
|
@ -44,8 +44,8 @@ def relay_controller(pin: int, status: str):
|
||||||
def get_water_level():
|
def get_water_level():
|
||||||
GPIO.setmode(GPIO.BCM)
|
GPIO.setmode(GPIO.BCM)
|
||||||
GPIO.setwarnings(False)
|
GPIO.setwarnings(False)
|
||||||
GPIO_TRIGGER = 18
|
GPIO_TRIGGER = 24
|
||||||
GPIO_ECHO = 24
|
GPIO_ECHO = 8
|
||||||
GPIO.setup(GPIO_TRIGGER, GPIO.OUT)
|
GPIO.setup(GPIO_TRIGGER, GPIO.OUT)
|
||||||
GPIO.setup(GPIO_ECHO, GPIO.IN)
|
GPIO.setup(GPIO_ECHO, GPIO.IN)
|
||||||
GPIO.output(GPIO_TRIGGER, True)
|
GPIO.output(GPIO_TRIGGER, True)
|
||||||
|
|
Loading…
Reference in New Issue