示例#1
0
 def is_it_hot(self):
     GPIO.output(KETTLE, GPIO.HIGH)
     TEMP = read_temp()
     if TEMP < 67:
         print TEMP
         self.add_timer(Timer(10, self.is_it_hot))
     else:
         GPIO.output(KETTLE, GPIO.LOW)
         self.on_after_wait(0, (12 / 5) * self.ozCoffee, SOLENOID)
         self.add_timer(Timer(180, self.finish))
示例#2
0
 def is_it_hot(self):
     GPIO.output(KETTLE, GPIO.HIGH)
     TEMP = read_temp()
     if TEMP < 67:
         print TEMP
         threading.Timer(10, self.is_it_hot).start()
     else:
         GPIO.output(KETTLE, GPIO.LOW)
         self.on_after_wait(0, (12 / 5) * self.ozCoffee, SOLENOID)
         threading.Timer(180, SendEmail).start()
示例#3
0
 def is_it_hot(self):
     GPIO.output(KETTLE, GPIO.HIGH)
     TEMP=read_temp()
     if TEMP < 67:
        print TEMP
        self.add_timer(Timer(10, self.is_it_hot))
     else:
        GPIO.output(KETTLE, GPIO.LOW)
        self.on_after_wait(0, (12/5)*self.ozCoffee, SOLENOID)
        self.add_timer(Timer(180, self.finish))
示例#4
0
 def is_it_hot(self):
     GPIO.output(KETTLE, GPIO.HIGH)
     self.status[KETTLE] = True
     TEMP=read_temp()
     if TEMP < 67:
        print TEMP
        threading.Timer(10, self.is_it_hot).start()
     else:
        GPIO.output(KETTLE, GPIO.LOW)
        self.status[KETTLE] = False
        self.on_after_wait(0, (12/5)*self.ozCoffee, SOLENOID)
        threading.Timer(180, self.all_done).start()