# Micro Python code for Display Pack 2.0

**URL:** <https://forums.pimoroni.com/t/micro-python-code-for-display-pack-2-0/23220>\
**Category:** Support\
**Created:** [November 4, 2023, 8:48pm UTC](https://forums.pimoroni.com/t/micro-python-code-for-display-pack-2-0/23220 "2023-11-04T20:48:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PicoBoy](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@PicoBoy](https://forums.pimoroni.com/u/PicoBoy)\
**Post date:** [November 4, 2023, 8:48pm UTC](https://forums.pimoroni.com/t/micro-python-code-for-display-pack-2-0/23220/1 "2023-11-04T20:48:14Z")

</div>

Hello,  
I’ve got a Pico and I’ve added the Display Pack 2.0. I’ve found the code to make bouncing balls and can get that to run nicely. Now… all I want to be able to do is display some text on the display. I’ve worked my way through all that I can find, created some code and it does very little. Please can you advise me where I’m going wrong, or can you suggest the code I need?

import time  
from picographics import PicoGraphics, DISPLAY\_PICO\_DISPLAY\_2  
display = PicoGraphics(display=DISPLAY\_PICO\_DISPLAY\_2)

from picographics import PicoGraphics, DISPLAY\_PICO\_DISPLAY\_2, PEN\_P8

display = PicoGraphics(display=DISPLAY\_PICO\_DISPLAY\_2, pen\_type=PEN\_P8)  
display.set\_backlight(1)

# Set the required rotation

# display = PicoGraphics(display=DISPLAY\_PICO\_DISPLAY\_2, rotate=0)

# Set the backlighting level

display.set\_backlight(1)

# Set the font

display.set\_font(“sans”)

# Set the thickness of the font lines in pixels

# display.set\_thickness(4)

display.text(“Hello World”, 100, 100, wordwrap=200, scale=4)

# display.circle(100, 100, 50)

time.sleep(5)

# display.set\_font(“bitmap8”)

# display.character(38, 0, 0, scale=2)

---

<div class="post-metadata">

**Author:** ![Shoe](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Shoe](https://forums.pimoroni.com/u/Shoe)\
**Post date:** [November 4, 2023, 10:38pm UTC](https://forums.pimoroni.com/t/micro-python-code-for-display-pack-2-0/23220/2 "2023-11-04T22:38:04Z")

</div>

Just FYI, if you have three backticks (`) before and after your code then it formats it to be more easily read:

```auto
import time
from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2)

from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_P8

display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_P8)
display.set_backlight(1)
Set the required rotation
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, rotate=0)
Set the backlighting level

display.set_backlight(1)
Set the font

display.set_font(“sans”)
Set the thickness of the font lines in pixels
display.set_thickness(4)

display.text(“Hello World”, 100, 100, wordwrap=200, scale=4)
display.circle(100, 100, 50)

time.sleep(5)
display.set_font(“bitmap8”)
display.character(38, 0, 0, scale=2)

```

I don’t know PicoGraphics especially well, but it looks like you’re missing a call to the `display.update()` function.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [November 5, 2023, 5:10pm UTC](https://forums.pimoroni.com/t/micro-python-code-for-display-pack-2-0/23220/3 "2023-11-05T17:10:40Z")

</div>

> [@Shoe](#):
>
> I don’t know PicoGraphics especially well, but it looks like you’re missing a call to the `display.update()` function.

Ditto to that. You need at least one to display anything.
