kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Pico Display 2.x: Fixed button function
rodzic
871399af72
commit
61ca10eaca
|
@ -8,10 +8,10 @@ from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_RGB565
|
|||
from pimoroni import RGBLED
|
||||
from machine import Pin
|
||||
|
||||
button_a = Pin(12, Pin.IN)
|
||||
button_b = Pin(13, Pin.IN)
|
||||
button_x = Pin(14, Pin.IN)
|
||||
button_y = Pin(15, Pin.IN)
|
||||
button_a = Pin(12, Pin.IN, Pin.PULL_UP)
|
||||
button_b = Pin(13, Pin.IN, Pin.PULL_UP)
|
||||
button_x = Pin(14, Pin.IN, Pin.PULL_UP)
|
||||
button_y = Pin(15, Pin.IN, Pin.PULL_UP)
|
||||
|
||||
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_RGB565, rotate=0)
|
||||
display.set_backlight(0.8)
|
||||
|
|
|
@ -8,10 +8,10 @@ from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_RGB565
|
|||
from pimoroni import RGBLED
|
||||
from machine import Pin
|
||||
|
||||
button_a = Pin(12, Pin.IN)
|
||||
button_b = Pin(13, Pin.IN)
|
||||
button_x = Pin(14, Pin.IN)
|
||||
button_y = Pin(15, Pin.IN)
|
||||
button_a = Pin(12, Pin.IN, Pin.PULL_UP)
|
||||
button_b = Pin(13, Pin.IN, Pin.PULL_UP)
|
||||
button_x = Pin(14, Pin.IN, Pin.PULL_UP)
|
||||
button_y = Pin(15, Pin.IN, Pin.PULL_UP)
|
||||
|
||||
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_RGB565, rotate=0)
|
||||
display.set_backlight(0.8)
|
||||
|
|
Ładowanie…
Reference in New Issue