Ejemplo n.º 1
0
	def closeApp(self):
		print("Bye!")
		lcd.displayString("     (.)(.)     ", 1)
		lcd.displayString("      BYE!      ", 2)
		sleep(1)
		lcd.clear()
		lcd.backlight(0)
		return False
Ejemplo n.º 2
0
	def updateClock(self, timeState, triggerState):
		startTime = time()
		currentTime = clock.getTimeString()
		while time() - startTime < LCD_DURATION:
			if (currentTime is not clock.getTimeString()):
				currentTime = clock.getTimeString()
				lcd.displayString(currentTime, 1)
				# lcd.displayString(str(currentDistance.get()).zfill(3), 2)
				humidityString = "H:" + thSource.getHumidity() + "%"
				temperatureString = "T:" + thSource.getTemperature() + "*C"
				lcd.displayTwoElementsJustified(temperatureString, humidityString, 2, LCD_CHARINLINE)
			if self.changeState(triggerState, startTime):
				return True
		lcd.clear()
		self.state = timeState
		return True
Ejemplo n.º 3
0
	def showTits(self):
		lcd.displayString("     (.)(.)     ", 1)
		lcd.displayString("      )  (      ", 2)
		return self.waitForChange(1, 1)