Update relay GPIO write method to use integer values and display last button press time on LCD
This commit is contained in:
2
init.py
2
init.py
@@ -49,7 +49,7 @@ class AlarmClock:
|
||||
print(f"Button '{button}' pressed state: {state}")
|
||||
if button == "button":
|
||||
self.lastButtonPressTime = time()
|
||||
self.relayGpio.write(GPIO.HIGH if state else GPIO.LOW)
|
||||
self.relayGpio.write(1 if state else 0)
|
||||
self.setLcdText(self.lastButtonPressTime.__str__())
|
||||
|
||||
def setLcdText(self, text: str):
|
||||
|
||||
Reference in New Issue
Block a user