gizmo_eink_simpletest.py
1 import time 2 import displayio 3 from adafruit_gizmo import eink_gizmo 4 5 display = eink_gizmo.EInk_Gizmo() 6 7 # Create a display group for our screen objects 8 display_group = displayio.Group() 9 10 # Display a ruler graphic from the root directory of the CIRCUITPY drive 11 file = open("/display-ruler.bmp", "rb") 12 13 picture = displayio.OnDiskBitmap(file) 14 # Create a Tilegrid with the bitmap and put in the displayio group 15 sprite = displayio.TileGrid(picture, pixel_shader=displayio.ColorConverter()) 16 display_group.append(sprite) 17 18 # Place the display group on the screen 19 display.show(display_group) 20 21 # Refresh the display to have it actually show the image 22 # NOTE: Do not refresh eInk displays sooner than 180 seconds 23 display.refresh() 24 print("refreshed") 25 26 time.sleep(180)