Pico Display 2.x: Fixed button function

pull/1003/head
thirdr 2024-09-26 15:53:03 +01:00
rodzic 871399af72
commit 61ca10eaca
2 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -8,10 +8,10 @@ from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_RGB565
from pimoroni import RGBLED from pimoroni import RGBLED
from machine import Pin from machine import Pin
button_a = Pin(12, Pin.IN) button_a = Pin(12, Pin.IN, Pin.PULL_UP)
button_b = Pin(13, Pin.IN) button_b = Pin(13, Pin.IN, Pin.PULL_UP)
button_x = Pin(14, Pin.IN) button_x = Pin(14, Pin.IN, Pin.PULL_UP)
button_y = Pin(15, Pin.IN) button_y = Pin(15, Pin.IN, Pin.PULL_UP)
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_RGB565, rotate=0) display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_RGB565, rotate=0)
display.set_backlight(0.8) display.set_backlight(0.8)

Wyświetl plik

@ -8,10 +8,10 @@ from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_RGB565
from pimoroni import RGBLED from pimoroni import RGBLED
from machine import Pin from machine import Pin
button_a = Pin(12, Pin.IN) button_a = Pin(12, Pin.IN, Pin.PULL_UP)
button_b = Pin(13, Pin.IN) button_b = Pin(13, Pin.IN, Pin.PULL_UP)
button_x = Pin(14, Pin.IN) button_x = Pin(14, Pin.IN, Pin.PULL_UP)
button_y = Pin(15, Pin.IN) button_y = Pin(15, Pin.IN, Pin.PULL_UP)
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_RGB565, rotate=0) display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_RGB565, rotate=0)
display.set_backlight(0.8) display.set_backlight(0.8)