Skip to content

Latest commit

 

History

History
192 lines (132 loc) · 6.08 KB

README_cn.md

File metadata and controls

192 lines (132 loc) · 6.08 KB

ATOM Library

中文 | English

M5Atom Lite

M5Atom Matrix

描述

ATOM MatrixATOM Lite 是一款基于ESP32-PICO-D4的迷你开发板内置蓝牙和wifi,大小只有24*24mm,ATOM系列开发板包含IR,RGB LED, 按键和PH2.0接口,提供6个GPIO引脚。相比 ATOM Lite,ATOM Matrix拥有5 * 5 RGB LED矩阵和MPU6886.

PinMap

NeoGPIO27
BtnGPIO39
CLK(MPU6886)GPIO21
SDA(MPU6886)GPIO25
IRGPIO12
BtnGPIO39

GROVE interface

ESP32 chipGPIO32GPIO265VGND
PH2.0 interfaceSCLSDA5VGND

Display API Document

Public Types

enumAm_mode{kMoveRight,kMoveLeft,kMoveTop,kMoveButtom}

Public Functions

void animation(uint8_t *buffptr, uint8_t amspeed, uint8_t ammode, int64_t amcount = -1)
void displaybuff(uint8_t *buffptr, int8_t offsetx = 0, int8_t offsety = 0)
void MoveDisPlayBuff(int8_t offsetx = 0, int8_t offsety = 0)
void setBrightness(uint8_t brightness)
void drawpix(uint8_t xpos, uint8_t ypos, CRGB Color)
void drawpix(uint8_t Number, CRGB Color)
void fillpix(CRGB Color)
void clear()

enum Am_mode

ConstantValueDescription
LED_Display::kMoveRight0x01Move the image to the right
LED_Display::kMoveLeft0x02Move the image to the left
LED_Display::kMoveTop0x04Move the image to the top
LED_Display::kMoveButtom0x08Move the image to the buttom

Member Function Documentation


    void animation(uint8_t *buffptr, uint8_t amspeed, uint8_t ammode, int64_t amcount = -1)

Start moving animation of an image

parameter list

名称类型范围默认值描述
buffptruint8_t*--Image pointer
amspeeduint8_t0 ~ MAXSIZE of uint8_t -Time interval of image movement
ammodeuint8_tSee also Am_mode-Animation mode of image movement
amcountint64_t-1 ~ MAXSIZE of int64_t-1The distance the image moves (pixels)

return value


    void displaybuff(uint8_t *buffptr, int8_t offsetx = 0, int8_t offsety = 0)

Display an image

parameter list

名称类型范围默认值描述
buffptruint8_t*--Image pointer
offsetxuint8_t-127 ~ 127 0Horizontal image offset
offsetyuint8_t-127 ~ 127 0Vertical image offset

return value


    void MoveDisPlayBuff(int8_t offsetx = 0, int8_t offsety = 0)

Move the image data in the display buff

parameter list

名称类型范围默认值描述
offsetxint8_t-127 ~ 127 0Horizontal image offset
offsetyint8_t-127 ~ 127 0Vertical image offset

return value


    void setBrightness(uint8_t brightness)

Set the Leds Brightness
Warning: It is not recommended to set the LED brightness to 100. Setting the LED brightness to 100 may cause overheating

parameter list

名称类型范围默认值描述
brightnessuint8_t 0 ~ 100 -Brightness of Leds

return value


    void drawpix(uint8_t xpos, uint8_t ypos, CRGB Color)

Set the color of a LED in coordinate mode

parameter list

名称类型范围默认值描述
xposuint8_t0 ~ 255 0coordinate x
yposuint8_t0 ~ 255 0coordinate y
ColorCRGB--Color of Led

return value


    void drawpix(uint8_t Number, CRGB Color)

Set the color of a LED

parameter list

名称类型范围默认值描述
Numberuint8_t0 ~ 255 0number of Led
ColorCRGB--Color of Led

return value


    void fillpix(CRGB Color)

Set the color of all LEDs

parameter list

名称类型范围默认值描述
ColorCRGB--Color of Leds

return value


    void clear()

Close all of LEDs

parameter list

return value