Ejemplo n.º 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))
Ejemplo n.º 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()
Ejemplo n.º 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))
Ejemplo n.º 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()