Uncategorized

ili9341

ILI9341 Touchscreen Error

Ask Question

Asked 2 days ago

Modified 2 days ago

Viewed 38 times

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

Share

EditFollowClose 4Flag

edited 2 days ago

asked 2 days ago

MEnsar55's user avatar

MEnsar55

1122 bronze badges

Add a comment

Start a bounty

1 Answer

Sorted by:

Reset to default                                              Highest score (default)                                                                   Date modified (newest first)                                                                   Date created (oldest first)                              

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.

Share

EditFollowFlag

answered 2 days ago

liaifat85's user avatar

liaifat85

1111 bronze badge

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.