File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
micropython/examples/pico_display Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 8
8
from pimoroni import RGBLED
9
9
from machine import Pin
10
10
11
- button_a = Pin (12 , Pin .IN )
12
- button_b = Pin (13 , Pin .IN )
13
- button_x = Pin (14 , Pin .IN )
14
- button_y = Pin (15 , Pin .IN )
11
+ button_a = Pin (12 , Pin .IN , Pin . PULL_UP )
12
+ button_b = Pin (13 , Pin .IN , Pin . PULL_UP )
13
+ button_x = Pin (14 , Pin .IN , Pin . PULL_UP )
14
+ button_y = Pin (15 , Pin .IN , Pin . PULL_UP )
15
15
16
16
display = PicoGraphics (display = DISPLAY_PICO_DISPLAY_2 , pen_type = PEN_RGB565 , rotate = 0 )
17
17
display .set_backlight (0.8 )
Original file line number Diff line number Diff line change 8
8
from pimoroni import RGBLED
9
9
from machine import Pin
10
10
11
- button_a = Pin (12 , Pin .IN )
12
- button_b = Pin (13 , Pin .IN )
13
- button_x = Pin (14 , Pin .IN )
14
- button_y = Pin (15 , Pin .IN )
11
+ button_a = Pin (12 , Pin .IN , Pin . PULL_UP )
12
+ button_b = Pin (13 , Pin .IN , Pin . PULL_UP )
13
+ button_x = Pin (14 , Pin .IN , Pin . PULL_UP )
14
+ button_y = Pin (15 , Pin .IN , Pin . PULL_UP )
15
15
16
16
display = PicoGraphics (display = DISPLAY_PICO_DISPLAY_2 , pen_type = PEN_RGB565 , rotate = 0 )
17
17
display .set_backlight (0.8 )
You can’t perform that action at this time.
0 commit comments