Skip to content

Instantly share code, notes, and snippets.

View imliubo's full-sized avatar
👀
来了老弟?

IAMLIUBO imliubo

👀
来了老弟?
View GitHub Profile
@imliubo
imliubo / uiflow2_UserDisplay.py
Created March 3, 2023 08:34
How to use UserDisplay module in uiflow2.
# -*- encoding: utf-8 -*-
# User display example
from M5 import UserDisplay, Widgets
user_lcd = UserDisplay(
# LCD type
panel_type=UserDisplay.PANEL.GC9A01,
# resolution
width=240,
height=240,
@imliubo
imliubo / CoreInk-Clock.ino
Last active September 1, 2022 01:38
A simple clock based on M5CoreInk.
/*
A simple clock based on M5CoreInk.
*/
#include <WiFi.h>
#include <sntp.h>
#include <M5Unified.h>
#define WIFI_SSID "YOUR WIFI SSID"
#define WIFI_PASSWORD "YOUR WIFI PASSWD"
#define NTP_TIMEZONE "JST-8"
import sys
import m5
from m5 import lcd
import lvgl as lv
from imagetools import get_png_info, open_png
# M5 init auto detect board type
m5.begin()
# lvgl init
lcd.lvgl_init()
@imliubo
imliubo / M5Core2-display-image.py
Last active March 30, 2021 15:46
M5Core2 display images through HTTP request
import urequests
import time
import wifiCfg
from m5stack import lv, rtc
wifiCfg.auto_connect()
ticks_ms = 0
old_tick = 0