Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError when using text function #135

Open
KienoCard opened this issue Jul 5, 2023 · 0 comments
Open

KeyError when using text function #135

KienoCard opened this issue Jul 5, 2023 · 0 comments

Comments

@KienoCard
Copy link

Using /firmware/RP2/firmware.uf2
implementing code below found display text results in a KeyError regarding Width, regardless of font used (tried pacifico, chango, and inconsolata included in package). function write() works as expected with no errors.

This was also repeated in the hello.py example

`from machine import Pin, SPI, RTC
import st7789
import pacifico40 as font

spi_clock=Pin(10)
spi_MOSI=Pin(11)
spi_MISO=Pin(12)
tft_cs = Pin(13) #screen select
sd_cs = Pin(14) #sdcard select
tft_dc = Pin(15)
reset_pin=Pin(16)

spi = machine.SPI(1, baudrate=40000000, polarity=1, sck=spi_clock, mosi=spi_MOSI)
display = st7789.ST7789(spi, 240,240, cs=Pin(13, Pin.OUT), dc=tft_dc, reset=reset_pin,rotation=1)
display.init()

test_string = "T"
display.text(font, test_string, 50, 50)
print("Hello World")
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant