MiniOLED Unit
MiniOLED UNIT is a 0.42-inch I2C interface OLED screen unit, it’s a 72*40, monochrome white display.
Support the following products:
Micropython Example:
1# SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD 2# 3# SPDX-License-Identifier: MIT 4 5import os, sys, io 6import M5 7from M5 import * 8from hardware import I2C 9from hardware import Pin 10 11 12label0 = None 13label1 = None 14i2c0 = None 15minioled_0 = None 16 17 18def setup(): 19 global label0, label1, i2c0, minioled_0 20 21 M5.begin() 22 Widgets.fillScreen(0x222222) 23 label0 = Widgets.Label("CoreS3", 127, 109, 1.0, 0xFFFFFF, 0x222222, Widgets.FONTS.DejaVu18) 24 25 i2c0 = I2C(0, scl=Pin(1), sda=Pin(2), freq=100000) 26 minioled_0 = M5.addDisplay(i2c0, 0x3C, {"unit_mini_oled": True}) 27 label1 = Widgets.Label( 28 "Mini", 15, 9, 1.0, 0xFFFFFF, 0x222222, Widgets.FONTS.DejaVu18, minioled_0 29 ) 30 31 32def loop(): 33 global label0, label1, i2c0, minioled_0 34 M5.update() 35 36 37if __name__ == "__main__": 38 try: 39 setup() 40 while True: 41 loop() 42 except (Exception, KeyboardInterrupt) as e: 43 try: 44 from utility import print_error_msg 45 46 print_error_msg(e) 47 except ImportError: 48 print("please update to latest firmware")
UIFLOW2 Example:


