0

I'm using a Raspberry Pi Pico and an ili9341 touchscreen. To the codes below;

import machine
import ili9341

Set up the SPI bus

spi = machine.SPI(0, baudrate=10000000, miso=machine.Pin(16), mosi=machine.Pin(19), sck=machine.Pin(18))

Set up the LCD display

lcd = ili9341.ILI9341(spi, 240, 320, cs=machine.Pin(17), dc=machine.Pin(20))

Clear the screen

lcd.clear()

Write "Hello World" to the screen

lcd.write("Hello World")

Display the screen

lcd.display()

i am getting this error: Traceback (most recent call last): File "", line 8, in AttributeError: 'module' object has no attribute 'ILI9341'

I downloaded the .py file in the link. https://github.com/rdagger/micropython-ili9341/blob/master/ili9341.py

MEnsar55
  • 1
  • 2

1 Answers1

1

I think the error is occurring due to an installation problem with ili9341. Make sure that you have downloaded and installed the ili9341 library properly.

liaifat85
  • 67
  • 4