人生苦短我用python,非常方便,各种轮子都造好了
import gc
import time
from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_RGB332
display = PicoGraphics(DISPLAY_PICO_DISPLAY_2, pen_type=PEN_RGB332, rotate=0)
# set up constants for drawing
WIDTH, HEIGHT = display.get_bounds()
BLACK = display.create_pen(0, 0, 0)
# what size steps to take around the colour wheel
OFFSET = 0.0025
# variable to keep track of the hue
h = 0.0
while True:
h += OFFSET
display.set_pen(BLACK)
RAINBOW = display.create_pen_hsv(h, 2.0, 2.0)
display.set_pen(RAINBOW)
display.set_font("bitmap16")
display.text(f"Hello EEPW & DigiKey", 0, 0, WIDTH, 6)
display.update()
time.sleep(1.0 / 60)
我要赚赏金
