You've already forked toit-m5stack-core2
mirror of
https://github.com/m5stack/toit-m5stack-core2.git
synced 2026-05-20 10:38:06 -07:00
659 B
659 B
M5Stack Core2
Useful functions for the M5Stack Core2. Most of the functionality relates to the AXP192 power control chip that also controls the LCD backlight and reset lines, and the green LED.
Schematic is at https://static-cdn.m5stack.com/resource/docs/static/assets/img/product_pics/core/core2/core2_sch.webp
Example
import gpio
import m5stack_core2
main:
clock := gpio.Pin 22
data := gpio.Pin 21
// Create the power object and initialize the power config
// to its default values. Resets the LCD display and switches
// on the LCD backlight and the green power LED.
power := m5stack_core2.Power --clock=clock --data=data