Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ST7789 based (SPI) displays #652

Merged
merged 7 commits into from
May 9, 2024

Conversation

diyelectromusic
Copy link
Collaborator

Initial support for ST7789 SPI displays. Note that a typical small 240x240 display will only provide 15x2 characters.

New Minidexed.ini default settings in this build:

SPIBus=
ST7789Enabled=0
ST7789Data=
ST7789Select=
ST7789Reset=
ST7789Backlight=
ST7789Width=240
ST7789Height=240
ST7789Rotation=0

Note: default is for ST7789 and SPI support to be disabled.

I've successfully use it with my Pimoroni Pirate Audio (screen, buttons and audio output) with the following settings:

SoundDevice=i2s
LCDEnabled=1

SPIBus=0
ST7789Enabled=1
ST7789Data=9
ST7789Select=1
ST7789Reset=
ST7789Backlight=13
ST7789Width=240
ST7789Height=240
ST7789Rotation=90

LCDColumns=15
LCDRows=2

ButtonPinPrev=5
ButtonActionPrev=click
ButtonPinNext=6
ButtonActionNext=click
ButtonPinBack=16
ButtonActionBack=click
ButtonPinSelect=24
ButtonActionSelect=click
ButtonPinHome=16
ButtonActionHome=doubleclick
ButtonPinShortcut=0

EncoderEnabled=0

Kevin

IMG_7789

@probonopd
Copy link
Owner

probonopd commented May 6, 2024

Thanks @diyelectromusic. I don't think I have such a display at hand for testing.
But indeed this could be interesting for people who do not want to solder.

Build for testing:
MiniDexed_2024-05-06-1bdab3d

@diyelectromusic
Copy link
Collaborator Author

I've found an issue with rotations with the code in circle. The fix will be merged into circle shortly, then I'll update the submod.sh script again to pull in the new version.

These are very common hobby displays and there are many boards with these displays and buttons that makes for quite a neat "all in one" solution. I think they could be quite beginner friendly (and I'm pretty sure someone asked about the Pirate Audio specifically at some point, but I can't find it now).

Kevin

@diyelectromusic
Copy link
Collaborator Author

Updated build now here:
MiniDexed_2024-05-07-dd14da0

Kevin

@chemati8
Copy link

chemati8 commented May 7, 2024

Can you write the entire minidexed.ini configuration in your rapsberry?

@diyelectromusic
Copy link
Collaborator Author

Can you write the entire minidexed.ini configuration in your rapsberry?

It should be the default minidexed.ini with the changes I mentioned in my first post - that is specific to the Pirate Audio board of course. Is that what you mean?

Kevin

@chemati8
Copy link

chemati8 commented May 7, 2024

I also have the audio pirate hat

@diyelectromusic
Copy link
Collaborator Author

Well I should warn you that I've managed to kill mine... but I'm pretty sure this is a hardware problem and nothing I've done in software ;)

IMG_7790

@chemati8
Copy link

chemati8 commented May 8, 2024

This works.Thank you

@probonopd
Copy link
Owner

So do you think this is in a state to merge this @diyelectromusic?

@chemati8
Copy link

chemati8 commented May 9, 2024

At least it worked for me

@diyelectromusic
Copy link
Collaborator Author

Well I can't see an issue with the rest of the system from merging this (famous last words I'm sure), so I guess if there are any problems left, we can just isolate the st7789 side of things...

... so yes, I'd say go for it :)

Then I'll update the wiki with the latest details.

Kevin

@probonopd probonopd merged commit d08280b into probonopd:main May 9, 2024
1 check passed
@probonopd
Copy link
Owner

Thanks @diyelectromusic

@diyelectromusic diyelectromusic deleted the st7789display branch May 10, 2024 06:59
@GertSchepens
Copy link

Awesome!

However, in the previous config, left down being next, and not the button next to the > arrow up right just broke my brain :) the buttons for me match to ..

# Pimoroni Pirate Audio
# up left; 5
# down left; 6
# up right; 16
# down right; 24

so my config looks like..

ButtonPinPrev=5
ButtonActionPrev=click
ButtonPinNext=16
ButtonActionNext=click
ButtonPinBack=24
ButtonActionBack=click
ButtonPinSelect=6
ButtonActionSelect=click
ButtonPinHome=24
ButtonActionHome=doubleclick
ButtonPinShortcut=0

probonopd added a commit that referenced this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants