DIGIPI Ham Software ILI9486 Screen Configuration
I recently bought an ICOM 7300 and have been playing with all the digitals modes on Windows, Mac, and Linux and various hunks of software. I’m a Raspberry Pi geek and found a distribution called DIGIPI by KM6LYW. The download is behind a paywall and you can get it for as little as $1. Anyway, DIGIPI can also be used with server screens and the one I bought is the ILI9486.
That was pretty great and it works once you select it during the Initialization phase. I found a file to 3D print a case and lo and behold my display was upside down.
NOTE: This blog only deals with flipping the screen on the ILI9486 screen. It is assumed that you have DIGIPI running and ran into the same issue I did!
Flip That Screen
Usually something like this is pretty easy. Usually in the code somewhere is a line that says:
rotate=90 (or 180, or 270)
Not so with the ILI9486. I googled all night long before I found the magic.
Open a terminal by selecting “shell” in the main window.
Now do this
sudo remount nano digibanner.py
Scroll down to the ILI9486 section and find the following code:
elif displaytype == 'ili9486':
## Largest ili9486 display, no buttons, (320x480
from spidev import SpiDev
spi = SpiDev(0,0)
spi.mode = 0b10
spi.max_speed_hz = 48000000
disp = ili9486.ILI9486(
spi=spi,
rst=25,
dc=24,
origin=ili9486.Origin.LOWER_RIGHT
).begin()
disp.invert()
fontbump = 10
Find the part that I have highlighted in red which says “LOWER_RIGHT”.
Change that to “UPPER_LEFT”
elif displaytype == 'ili9486':
## Largest ili9486 display, no buttons, (320x480
from spidev import SpiDev
spi = SpiDev(0,0)
spi.mode = 0b10
spi.max_speed_hz = 48000000
disp = ili9486.ILI9486(
spi=spi,
rst=25,
dc=24,
origin=ili9486.Origin.UPPER_LEFT
).begin()
disp.invert()
fontbump = 10
Hit CTL +X then Y to save that file. Reboot.
The developer of DIGIPI said to also do the same change to the file named direwatch.py for the aprs/ax25 modes.
And Bob will now and forever be your Uncle. My Pi with screen is just below the monitor and my shiny new ICOM IC-7300 is in business decoding some FT8.
Problem solved. Many thanks to KM6LYW for the DIGIPI software.
Two thumbs up!! great work! thanks for sharing.
do the same to direwatch.py too.. for the aprs/ax25 modes
Added it to the blog. Thanks!