# X8 DATA (1 SI MOSI) height = 96 # 1.27 inch 96*128 (rows*cols) display # height = 128 # 1.5 inch 128*128 display import machine import gc from ssd1351 import SSD1351 as SSD # Initialise hardware and framebuf before importing modules pdc = machine.Pin('X1', machine.Pin.OUT_PP, value=0) pcs = machine.Pin('X2', machine.Pin.OUT_PP, value=1) prst = machine.Pin('X3', machine.Pin.OUT_PP, value=1) spi = machine.SPI(1) gc.collect() # Precaution befor instantiating framebuf ssd = SSD(spi, pcs, pdc, prst, height) # Create a display instance import uasyncio as asyncio import asyn import pyb import uos from writer import CWriter from nanogui import LED, Meter, refresh refresh(ssd) # Fonts import arial10, freesans20 GREEN = SSD.rgb(0, 255, 0) RED = SSD.rgb(255, 0, 0) YELLOW = SSD.rgb(255, 255, 0)