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

GC9A01 display issue on Raspberry Pi 3 - no text is displayed #84

Closed
mytja opened this issue Mar 20, 2022 · 3 comments
Closed

GC9A01 display issue on Raspberry Pi 3 - no text is displayed #84

mytja opened this issue Mar 20, 2022 · 3 comments

Comments

@mytja
Copy link

mytja commented Mar 20, 2022

Hello,
So, I bought one of GC9A01 chip based SPI displays off AliExpress (not a link to AliExpress), and I started testing it. I use CircuitPython with latest adafruit-blinka installed on my Raspberry Pi 3B.
So, I installed all necessary libraries:

I'm using following code:

import time
import board
import math
import busio
import terminalio
import displayio
from adafruit_display_text import label
import gc9a01

# Release any resources currently in use for the displays
displayio.release_displays()

spi = board.SPI()

# Make the displayio SPI bus and the GC9A01 display
display_bus = displayio.FourWire(spi, command=board.D25, chip_select=board.D18, reset=board.D27)
display = gc9a01.GC9A01(display_bus, width=240, height=240)

# Make the main display context
main = displayio.Group()
display.show(main)

# Draw a text label
text = "Hello\nWorld!"
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00,
                        anchor_point=(0.5,0.5), anchored_position=(0,0))
text_group = displayio.Group(scale=2)
text_group.append(text_area) 
main.append(text_group)

# Animate the text 
theta = math.pi
r = 75
while True:
    print(time.monotonic(),"hello")
    text_group.x = 120 + int(r * math.sin(theta))
    text_group.y = 120 + int(r * math.cos(theta))
    theta -= 0.05
    time.sleep(0.01)

The problem is, that this code gives me following output (sorry my hands are shaking):

20220320_150302.mp4

So, I decided to use Pi Pico to test if display is faulty. So I flashed it with latest CircuitPython firmware, installed everything, modified my code to Pico's pins, and here is the result:

20220320_183037.mp4

I really don't think it's the CircuitPython GC9A01's fault. I also checked wiring on my Raspberry Pi 3 like a million times. So, my guess is that it's blinka-displayio's fault, as Pico uses CircuitPython's displayio, meanwhile Pi 3 uses blinka-displayio, which is a port to Unix & Unix-like operating systems.

I'm also not using integrated (hardware) Chip-Select pin, as it's not recommended.

Let me know what you think is the issue.
Awaiting your response and thank you for everything upfront 🙏


Code source

@makermelissa
Copy link
Collaborator

Currently the Blinka Displayio implementation is not complete and is only a subset of CircuitPython's Displayio. It has not been tested with this display. It's likely using part of the codebase that is missing.

@makermelissa
Copy link
Collaborator

#114 should get it working if you still have the display and are interested. Otherwise, I will likely just close this issue after it's merged.

@makermelissa
Copy link
Collaborator

Closing as this should be fixed.

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

No branches or pull requests

2 participants