Created
June 19, 2020 16:29
-
-
Save hierophect/e767f9a5225407130ca85cb8a6f0ab40 to your computer and use it in GitHub Desktop.
RGB Matrix test F405
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import adafruit_display_text.label | |
import board | |
import displayio | |
import framebufferio | |
import rgbmatrix | |
import terminalio | |
import time | |
displayio.release_displays() | |
matrix = rgbmatrix.RGBMatrix( | |
width=32, height=32, bit_depth=4, | |
rgb_pins=[board.D13, board.D12, board.D11, board.A4, board.A5, board.D6], | |
addr_pins=[board.A0, board.A1, board.A2, board.A3], | |
clock_pin=board.D5, latch_pin=board.D9, output_enable_pin=board.D10) | |
# Associate the RGB matrix with a Display so that we can use displayio features | |
display = framebufferio.FramebufferDisplay(matrix, auto_refresh=True) | |
line1 = adafruit_display_text.label.Label( | |
terminalio.FONT, | |
color=0xff0000, | |
text="++++") | |
line1.x = 4 | |
line1.y = 8 | |
# line2 = adafruit_display_text.label.Label( | |
# terminalio.FONT, | |
# color=0x0080ff, | |
# text="Hello World") | |
# line2.x = display.width | |
# line2.y = 24 | |
g = displayio.Group() | |
g.append(line1) | |
# g.append(line2) | |
display.show(g) | |
while True: | |
pass | |
# print(line1.width) | |
# display.refresh(minimum_frames_per_second=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment