hugmouse / ESP32-ST7789-Micropython

Just a little experiment with Micropython + ESP32 + ST7789

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silly little header image for this project

ESP32 + ST7789 + Micropython

Just a little experiment with ST7789 240x240px display, includes bare-bones SPI display driver.

Requirements

Hacking

I was writing this code in REPL, so just copy and paste all the stuff from main.py into your micropython repl and you good to go!

Make sure to replace those variables though:

scl_pin = REPLACE
sda_pin = WITH
res_pin = YOUR
dc_pin = PINS

Example usage:

def rainbow_cycle():
    """
    Cycles through rainbow colors and displays it on the screen!
    """
    rainbow_colors = [
        0xF800,  # Red
        0xFC00,  # Orange
        0xFFE0,  # Yellow
        0x07E0,  # Green
        0x001F,  # Blue
        0x781F,  # Indigo
        0x780F,  # Violet
    ]

    for color in rainbow_colors:
        fill_color_chunked_optimized(color)

Example output:

Forgithub.mp4

Other stuff

About

Just a little experiment with Micropython + ESP32 + ST7789


Languages

Language:Python 100.0%