I have written some basic code to display text on my Pimoroni 0.96" breakout display. I now want that same information but on a larger 1.54" breakout display. However, the larger screen displays nothing (though the backlight is on).
When using the larger display I adapted the code below in the following ways:
Line 4:
from picographics import DISPLAY_LCD_240X240
Line 8:
display = PicoGraphics(display=DISPLAY_LCD_240X240, pen_type=PEN_P4, rotate=0)
Anything else I might be missing??
import utime
from pimoroni import Button
from picographics import PicoGraphics
from picographics import DISPLAY_LCD_160X80
from picographics import PEN_P4
display = PicoGraphics(display=DISPLAY_LCD_160X80, pen_type=PEN_P4, rotate=0)
WIDTH, HEIGHT = display.get_bounds()
display.set_backlight(1.0)
display.set_font(“bitmap8”)
RED = display.create_pen(255, 000, 000)
PURPLE = display.create_pen(255, 000, 255)
YELLOW = display.create_pen(255, 255, 000)
GREEN = display.create_pen(000, 255, 000)
CYAN = display.create_pen(000, 255, 255)
BLUE = display.create_pen(000, 000, 255)
WHITE = display.create_pen(255, 255, 255)
BLACK = display.create_pen(0, 0, 0)
def clear():
display.set_pen(BLACK)
display.clear()
display.update()
clear()
display.set_pen(BLUE)
display.set_font(“bitmap6”)
display.text(“PICO Man”,5,5,scale=1) # PICO Man in small blue letters
display.text(“PICO Man”,5,20,scale=2) # there is no “scale 1.5”
display.text(“PICO Man”,5,40,scale=3)
display.update()
utime.sleep(2)
clear()
display.set_pen(RED)
display.set_font(“bitmap8”)
display.text(“PICO Man”,5,5,scale=1) # PICO Man in small blue letters
display.text(“PICO Man”,5,20,scale=2) # there is no “scale 1.5”
display.text(“PICO Man”,5,40,scale=3)
display.update()
utime.sleep(2)
clear()
display.set_pen(GREEN)
display.set_font(“bitmap14_outline”)
display.text(“PICO Man”,5,5,scale=1)
display.text(“PICO Man”,5,15,scale=2)
display.text(“PICO Man”,5,35,scale=3)
display.update()
utime.sleep(2)
clear()
display.set_pen(WHITE)
display.set_font(“sans”)
display.text(“PICO Man”,5,40,scale=1)
display.update()
utime.sleep(2)
clear()
display.set_pen(WHITE)
display.set_font(“serif_italic”)
display.text(“PICO Man”,5,40,scale=1)
display.update()
utime.sleep(2)
clear()
display.set_pen(WHITE)
display.set_font(“serif”)
display.text(“PICO Man”,5,40,scale=1)
display.update()