在三色 E-Ink Gizmo 上顯示社區 logo

在 Adafruit Circuit Playground Tri-Color E-Ink Gizmo  上顯示社區的Logo。

顯示效果(因爲黃色無法顯示,所以換成了紅色):

參考程序

  • 需要先將Logo轉換爲bmp圖片並上傳到circuit playground開發板
  • 下載並安裝下面的庫文件到開發板的lib目錄
    • adafruit_il0373.mpy
    • adafruit_ssd1681.mpy
    • adafruit_gizmo
import time
import displayio
from adafruit_gizmo import eink_gizmo

display = eink_gizmo.EInk_Gizmo()
# Use the below line instead for the 200x200 E-Ink Gizmo
# display = eink_gizmo.EInk_HD_Gizmo()

# Create a display group for our screen objects
display_group = displayio.Group()

# Display a ruler graphic from the root directory of the CIRCUITPY drive
file = open("/mpycn.bmp", "rb")

picture = displayio.OnDiskBitmap(file)
# Create a Tilegrid with the bitmap and put in the displayio group
sprite = displayio.TileGrid(picture, pixel_shader=displayio.ColorConverter())
display_group.append(sprite)

# Place the display group on the screen
display.show(display_group)

# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
display.refresh()

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章