使用示例:
import framebuf, futaba_8md06inkm, time
from machine import Pin, freq, SPI
freq(240000000)
hspi = SPI(1, 5000000)
en = Pin(4)
rst = Pin(5)
cs = Pin(26)
display = Futaba_8MD06INKM.VFD(hspi, rst, cs, en)
基于Framebuf显示
display.fill(0)
display.text('Reboot93', i, 0)
display.show()
显示内置字符 (类似ssd1306)
display.display_str(0, ‘12345678’) # Starting at block 0 display '12345678'
# 从0位开始显示'12345678'
# Only characters that already exist in the CGRAM can be display
# 只能显示CGRAM中已经存在的字符
自定义单块显示内容
buf = bytearray(5)
fbuf = framebuf.FrameBuffer(buf, 5, 7, framebuf.MONO_VLSB)
fbuf.rect(0, 0, 5, 7, 1)
display.display_custom(0,buf)
清除显示内容
display.clear() # 清除所有 clear all
display.clear(0) # 清除0位 clear block 0
设置亮度
display.set_display_dimming(255) # 0~255
开/关屏幕
display.on()
display.off()