add pump
This commit is contained in:
parent
f11936ba0e
commit
b2ce1ae854
1 changed files with 5 additions and 2 deletions
|
|
@ -15,10 +15,11 @@ chiller = DigitalInOut(board.D3) # Pin to control the chiller and fan
|
|||
chiller.direction = Direction.OUTPUT
|
||||
|
||||
pump = DigitalInOut(board.D4) # Pin to control the pump
|
||||
pump.direction = Direction.OUTPUT
|
||||
|
||||
chillTime = 30 # How many seconds of cooling
|
||||
chillTime = 10 # How many seconds of cooling
|
||||
|
||||
pumpTime = 5 # How many seconds of pumping
|
||||
pumpTime = 15 # How many seconds of pumping
|
||||
|
||||
while True:
|
||||
# we could also just do "led.value = not button.value" !
|
||||
|
|
@ -26,10 +27,12 @@ while True:
|
|||
print('not')
|
||||
led.value = False
|
||||
chiller.value = False
|
||||
pumping.value = False
|
||||
else:
|
||||
print('pressed')
|
||||
led.value = True
|
||||
chiller.value = True
|
||||
pump.value = True
|
||||
time.sleep(chillTime)
|
||||
|
||||
time.sleep(0.01) # debounce delay
|
||||
|
|
|
|||
Loading…
Reference in a new issue