Skip to content

mateo/Odroid-ILI9341

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

Scripts for using an ILI9341 LCD with an Odroid XU4 in Python

Look this isn't fancy. I was having a lot of trouble getting the Odroid XU4 to work with this Adafruit SPI LCD. After messing around with some libraries, opening a ticket, and getting to the bottom of the issues, here's an install script that sets the Odroid up for use and a test script that makes sure everything is working.

Libraries

The main libraries at work here are libgpiod, Adafruit Blinka and Adafruit CircuitPython (more specifically, adafruit/Adafruit_CircuitPython_RGB_Display)

Usage

First use the setup script to initialize SPI and install all the libraries:

sudo chmod a+x setup.sh
./setup.sh

After this, a good test to make sure everything works is to run sudo python3

>>> import board
>>> dir(board)

The output should be an oject containing a list of Adafruit named pinouts, most starting with D and some SPI and I2C specific ones.

Then run the test script sudo python3 test.py

If you are using another CircuitPython Compatible Display this test script should work, just adapt it through the guide linked below

Pin Numberings

The software pin numberings used here are defined as part of Adafruit Blinka. The pin numberings are based on the Shifter Shield physical pinout (Pin D7 is the 7th physical pin). The shifter shield is required to use this LCD as the SPI bus requires at minimum 3.3v logic, but if you plan to use the GPIO pins for other purposes at 1.8v, check the schematic for the shifter shield to figure out the Adafruit pin numberings, or use this handy chart I made because I love you kind stranger

CON10

Adafruit Pin GPIO Physical Pin Odroid GPIO Pin WiringPi Pin Name
D3 16 209 8 I2C_1.SDA
D5 14 210 9 I2C_1.SCL
D7 15 18 7
D8 8 172 15 UART0.TXD
D10 6 171 16 UART0.RXD
D11 5 174 0 UART0.RTSN
D12 4 173 1 UART0.CTSN
D13 13 21 2
D15 17 22 3
D16 18 19 4
D18 25 23 5
D19 7 192 12 SPI_1.MOSI
D21 9 191 13 SPI_1.MISO
D22 26 24 6
D23 10 189 14 SPI_1.CLK
D24 11 190 10 SPI_1.CSN
D26 24 25 11
D29 20 28 21
D31 19 30 22
D32 21 29 26
D33 22 31 23
D36 27 33 27

CON11

Adafruit Pin GPIO Physical Pin Odroid GPIO Pin WiringPi Pin Name
D27 4 187 30 I2C_5.SDA
D28 6 188 31 I2C_5.SCL

Final Notes

I do not maintain any of the libraries involved in these scripts nor do I even know that much about them, any questions regarding them should be directed to the creators, however if this script fails to run do let me know, I can try my best to troubleshoot. If you wish to use this with the same display, or another CircuitPython supported display, check out this guide from Adafruit but skip any steps regarding dependencies

About

Setup Scripts for using an ILI9341 LCD with the Odroid XU4 through Adafruit's Blinka and Circuitpython

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published