diff --git a/examples/rgb_display_minipitfttest.py b/examples/rgb_display_minipitfttest.py index 08287e1..ba20eab 100644 --- a/examples/rgb_display_minipitfttest.py +++ b/examples/rgb_display_minipitfttest.py @@ -23,7 +23,7 @@ # Main loop: while True: - if not buttonA.value and not buttonB.value: + if buttonA.value and buttonB.value: backlight.value = False # turn off backlight else: backlight.value = True # turn on backlight @@ -31,5 +31,5 @@ display.fill(color565(255, 0, 0)) # red if buttonA.value and not buttonB.value: # just button B pressed display.fill(color565(0, 0, 255)) # blue - if buttonA.value and buttonB.value: # none pressed + if not buttonA.value and not buttonB.value: # none pressed display.fill(color565(0, 255, 0)) # green