This commit is contained in:
John Edgar Park 2017-10-26 12:03:17 -07:00
parent f11936ba0e
commit b2ce1ae854

View file

@ -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