Raspberry Pi Pico and TFT ILI9341 with Circuit Python
I decided to write another tutorial on the Raspberry Pi Pico, mainly because the card is very recent and there is still not much documentation on its use. Although CircuitPython is extremely easy to use, most of the examples on the Adafruit website are not yet adapted for the new card.
So I decided to do my part.
This version of the TFT LCD display that I purchased here in Brazil does not come with the CS pin, which is used in many libraries. This offered me some challenge. At the end of the day, I indicated a pin on the nameplate in the call to the driver, but there is no connection made between the CS pin (absent in the display) and the Raspberrry Pi Pico.
The connection between the raspberry pi pico and the display looks like this:
PICO > DISPLAY
3V3 OUT (Pin 36) > VCC
Any GND > GND
SPI0SCK(Pin 4) > SCK
SPI0TX (Pin 5) > MISO
SP0RX (Pin 6) > MOSI
SPI0CS (Pin7) > RES (This display doesn′t have a CS Pin)
PIN 9 > DC
PIN10 > BLK
import board import busio import displayio import terminalio #Just a font import adafruit_ili9341 from adafruit_display_text import label dc=board.GP5 rst=board.GP6 blk=board.GP7 cs=board.GP8 #My display does not have it... spi = busio.SPI(clock=board.GP2, MOSI=board.GP3, MISO=board.GP4) displayio.release_displays() display_bus = displayio.FourWire(spi, command = dc, chip_select=cs, reset=rst) display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240) splash = displayio.Group(max_size=10) display.show(splash) # Draw a green background color_bitmap = displayio.Bitmap(320, 240, 1) color_palette = displayio.Palette(1) color_palette[0] = 0x00FF00 # Bright Green bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette, x=0, y=0) splash.append(bg_sprite) # Draw a smaller inner rectangle inner_bitmap = displayio.Bitmap(280, 200, 1) inner_palette = displayio.Palette(1) inner_palette[0] = 0xAA0088 # Purple inner_sprite = displayio.TileGrid(inner_bitmap, pixel_shader=inner_palette, x=20, y=20) splash.append(inner_sprite) # Draw a label text_group = displayio.Group(max_size=10, scale=3, x=57, y=120) text = "Hello World!" text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00) text_group.append(text_area) # Subgroup for text scaling splash.append(text_group)
If you are typing each of these lines in the REPL, you will be able to see what each one does.
Raspberry Pi Pico and TFT ILI9341 with Circuit Python
- Comments(0)
- Likes(4)
- Engineer Aug 30,2024
- Engineer Aug 20,2024
- Rudy Panigas Jun 23,2024
- Engineer May 10,2024
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by nicolaudosbrinquedos
- Homeassistant in Beaglebone Black With Debian 11 Intro: The primary objective of my project was to give some use to the Beaglebone Black that has bee...
- The Adventures of Porting Circuitpython to Wio RP2040 I have been developing some electronic props solutions for Escape Rooms. And periodically I usually ...
- Simple Electronics to Escape Room Owners - Using a bunch of voltmeters with PCA9685 This is a preliminary study for an Escape Room game. My main goal was to add as many analog displays...
- Simple Electronics to Escape Room Owners - First Chapter I've been developing puzzles and artifacts for Escape Room since 2018 and most of the time, I've bee...
- Finally! Animated Eyes using Seed Xiao RP2040 This is another advance in my studies to enable a more economically viable version for the Monster M...
- Circuitpython on Seeed XIAO RP2040 Step 1: Unboxing... I2C Not Working?As soon as the card arrived, I installed the firmware version fo...
- Raspberry Pi Pico with GC9A01 Round Display using Arduino IDE and TFT-eSPI Library This is a work in progress for another one of the artifacts I used in Leonardo Cortez's "Strange Hou...
- Recreating an 80s TV with Raspberry Pi Recently I built a series of special effects for the scenography of the play "Strange House" by Leon...
- Talk to Me This project is part of an extensive research on the use of animatronics and interactive objects tha...
- Back in time! Make a Zoetrope using Arduino I'm working on a series of animated objects for a children's play and decided to build a Zoetrope, t...
- Alastor Moody Eye using Raspberry Pi Pico, CircuitPython and Round Display GC9A01 I am developing a series of objects for a children's play about fear and terror. And then I got insp...
- The Crazy Pots Game At some point on the internet I came across someone who had made a game like that, but unfortunately...
- Arduino Mastermind Game I created this little game as a hobby for my children during the Covid-19 quarantine. I had already ...
- Raspberry Pi Pico With I2C Oled Display and CircuitPython This is my first experience using this little board from Raspberry Pi Foundation.I preferred to inst...
- Raspberry Pi Pico and TFT ILI9341 with Circuit Python I decided to write another tutorial on the Raspberry Pi Pico, mainly because the card is very recent...
- Arduino Minesweeeper It was then that I found the works of Rachit Belwariar, on the page https://www.geeksforgeeks.org/cp...
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
71 1 1 -
-
-
-
Sega Master System RGB Encoder Switcher Z80 QSB v1.2
68 0 0 -
18650 2S2P Battery Charger, Protection and 5V Output Board
96 0 0 -
High Precision Thermal Imager + Infrared Thermometer | OpenTemp
487 0 7 -
Sony PlayStation Multi Output Frequency Oscillator (MOFO) v1
141 0 2 -