# Trouble getting the Pimoroni pico display 2.0" working

**URL:** <https://forum.core-electronics.com.au/t/trouble-getting-the-pimoroni-pico-display-2-0-working/17674>\
**Category:** Pimoroni\
**Created:** [25 July 2023 04:59 UTC](https://forum.core-electronics.com.au/t/trouble-getting-the-pimoroni-pico-display-2-0-working/17674 "2023-07-25T04:59:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas193967](https://avatars.discourse-cdn.com/v4/letter/n/4da419/32.png) [@Nicholas193967](https://forum.core-electronics.com.au/u/Nicholas193967)\
**Post date:** [25 July 2023 04:59 UTC](https://forum.core-electronics.com.au/t/trouble-getting-the-pimoroni-pico-display-2-0-working/17674/1 "2023-07-25T04:59:50Z")

</div>

Hi All  
I have just purchased the pico display pack 2.0 (320x240) and in the sample code it requires that I access Picographs ( from picographics import PicoGraphics, DISPLAY\_PICO\_DISPLAY, PEN\_P8 )

but I cannot install it from the PyPI plugin section.  
I am able to find the folder in Pimoroni libraries on line but I dont know how to get the required file onto my computer, I’m using windows 11.  
See code below

```auto
import time
import random
from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY, PEN_P8

display = PicoGraphics(display=DISPLAY_PICO_DISPLAY, pen_type=PEN_P8)
display.set_backlight(1.0)

WIDTH, HEIGHT = display.get_bounds()

# We're creating 100 balls with their own individual colour and 1 BG colour
# for a total of 101 colours, which will all fit in the custom 256 entry palette!

class Ball:
    def __init__ (self, x, y, r, dx, dy, pen):
        self.x = x
        self.y = y
        self.r = r
        self.dx = dx
        self.dy = dy
        self.pen = pen

# initialise shapes
balls = []
for i in range(0, 100):
    r = random.randint(0, 10) + 3
    balls.append(
        Ball(
            random.randint(r, r + (WIDTH - 2 * r)),
            random.randint(r, r + (HEIGHT - 2 * r)),
            r,
            (14 - r) / 2,
            (14 - r) / 2,
            display.create_pen(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)),
        )
    )

BG = display.create_pen(40, 40, 40)

while True:
    display.set_pen(BG)
    display.clear()

    for ball in balls:
        ball.x += ball.dx
        ball.y += ball.dy

        xmax = WIDTH - ball.r
        xmin = ball.r
        ymax = HEIGHT - ball.r
        ymin = ball.r

        if ball.x < xmin or ball.x > xmax:
            ball.dx *= -1

        if ball.y < ymin or ball.y > ymax:
            ball.dy *= -1

        display.set_pen(ball.pen)
        display.circle(int(ball.x), int(ball.y), int(ball.r))

    display.update()
    time.sleep(0.01) `
...................................................................

```

1. [pimoroni-pico](https://github.com/pimoroni/pimoroni-pico/tree/main)
2. /[libraries](https://github.com/pimoroni/pimoroni-pico/tree/main/libraries)

# pico\_graphics

} this is the path on the pimoroni site

I hope I have provided enough info, I have tried to correct the code formatting but it didn’t work  
Hopefully this is understandable  
looking forward to your replies  
Nick

---

<div class="post-metadata">

**Author:** ![Liam](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam/32/3562_2.png) [@Liam](https://forum.core-electronics.com.au/u/Liam)\
**Post date:** [25 July 2023 06:48 UTC](https://forum.core-electronics.com.au/t/trouble-getting-the-pimoroni-pico-display-2-0-working/17674/2 "2023-07-25T06:48:40Z")

</div>

Hi Nick,

Pimoroni actually use a different port of micropython to the main branch, you can grab it here: [Releases · pimoroni/pimoroni-pico · GitHub](https://github.com/pimoroni/pimoroni-pico/releases)

> [@Nicholas193967](#):
>
> I am able to find the folder in Pimoroni libraries on line but I dont know how to get the required file onto my computer, I’m using windows 11.

Those libraries are actually embedded into the port themselves as C files.

Once you have the Pimoroni version flashed to your Pico the import statements should work perfectly!

Liam

---

<div class="post-metadata">

**Author:** ![Nicholas193967](https://avatars.discourse-cdn.com/v4/letter/n/4da419/32.png) [@Nicholas193967](https://forum.core-electronics.com.au/u/Nicholas193967)\
**Post date:** [25 July 2023 07:25 UTC](https://forum.core-electronics.com.au/t/trouble-getting-the-pimoroni-pico-display-2-0-working/17674/3 "2023-07-25T07:25:42Z")

</div>

Liam  
You are a legend.I already had a different pimoroni uf2 file on my computer and had used that but your link solved the problem  
Thankyou

---

<div class="post-metadata">

**Author:** ![Nicholas193967](https://avatars.discourse-cdn.com/v4/letter/n/4da419/32.png) [@Nicholas193967](https://forum.core-electronics.com.au/u/Nicholas193967)\
**Post date:** [26 July 2023 02:39 UTC](https://forum.core-electronics.com.au/t/trouble-getting-the-pimoroni-pico-display-2-0-working/17674/4 "2023-07-26T02:39:56Z")

</div>

Further to my earlier question on this display ,  
In the samples provided by Pimoroni the information and framing provided does not fill the screen  
and I presume that the code

`display = PicoGraphics(display=DISPLAY_PICO_DISPLAY, pen_type=PEN_P8) WIDTH, HEIGHT = display.get_bounds()`

contains the restraints for this , but I would like to be able to use the full screen filled with data,colour ,or information. If `display.get_bounds` is the culprit , I’m not sure how to change it.

* * *

This code is from the balls example. The full code is below

```auto
import time
import random
from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY, PEN_P8

display = PicoGraphics(display=DISPLAY_PICO_DISPLAY, pen_type=PEN_P8)
display.set_backlight(1.0)

WIDTH, HEIGHT = display.get_bounds()

# We're creating 100 balls with their own individual colour and 1 BG colour
# for a total of 101 colours, which will all fit in the custom 256 entry palette!
class Ball:
    def __init__ (self, x, y, r, dx, dy, pen):
        self.x = x
        self.y = y
        self.r = r
        self.dx = dx
        self.dy = dy
        self.pen = pen

# initialise shapes
balls = []
for i in range(0, 50):
    r = random.randint(0, 10) + 3
    balls.append(
        Ball(
            random.randint(r, r + (WIDTH - 2 * r)),
            random.randint(r, r + (HEIGHT - 2 * r)),
            r,
            (14 - r) / 2,
            (14 - r) / 2,
            display.create_pen(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)),
        )
    )

BG = display.create_pen(30, 30, 40)

while True:
    display.set_pen(BG)
    display.clear()

    for ball in balls:
        ball.x += ball.dx
        ball.y += ball.dy

        xmax = WIDTH - ball.r
        xmin = ball.r
        ymax = HEIGHT - ball.r
        ymin = ball.r

        if ball.x < xmin or ball.x > xmax:
            ball.dx *= -1

        if ball.y < ymin or ball.y > ymax:
            ball.dy *= -1

        display.set_pen(ball.pen)
        display.circle(int(ball.x), int(ball.y), int(ball.r))

    display.update()
    time.sleep(0.01)

```

Can anyone provide any clues please  
Thank you in advance  
Nick

---

<div class="post-metadata">

**Author:** ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)\
**Post date:** [27 July 2023 02:08 UTC](https://forum.core-electronics.com.au/t/trouble-getting-the-pimoroni-pico-display-2-0-working/17674/5 "2023-07-27T02:08:45Z")

</div>

Hi Nicholas,

I suspect this is due to the fact that there are two sizes of Pico displays by Pimoroni, the good news is that both are supported by the library - here’s the relevant documentation section:  
 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/4/4bb5dcb9dec0bf4a49a62e272243891d72f41700.png)

> <https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules/picographics/README.md#supported-displays>

Try changing that around and see if it helps 🙂
