Skip to content

monstaruos/M5Atom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATOM Library

English | 中文

M5Atom Lite

M5Atom Matrix

Description

ATOM Matrix and ATOM Lite are ESP32 development board with a size of only 24 * 24mm.It provides more GPIO for user customization which is very suitable for embedded smart home devices and in making smart toys. The main control adopts the ESP32-PICO chip which comes integrated with Wi-Fi and Bluetooth technologies and has a 4MB of integrated SPI flash memory. ATOM board provides an Infra-Red LED, RGB LED, buttons, and a PH2.0 interface. In addition, it can connect to external sensors and actuators through 6 GPIOs. The on-board Type-C USB interface enables rapid program upload and execution. ATOM Matrix have 5 * 5 RGB LED matrix, built-in IMU sensor (MPU6886).

PinMap

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

GROVE interface

ESP32 chipGPIO32GPIO265VGND
PH2.0 interfaceSCLSDA5VGND

Atom pixel tool

AtomPixelTool

Click here to download

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

nametyperangedefaultdescription
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
null


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

Display an image

parameter list

nametyperangedefaultdescription
buffptruint8_t*--Image pointer
offsetxuint8_t-127 ~ 127 0Horizontal image offset
offsetyuint8_t-127 ~ 127 0Vertical image offset

return value
null


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

Move the image data in the display buff

parameter list

nametyperangedefaultdescription
offsetxint8_t-127 ~ 127 0Horizontal image offset
offsetyint8_t-127 ~ 127 0Vertical image offset

return value
null


    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

nametyperangedefaultdescription
brightnessuint8_t 0 ~ 100 -Brightness of Leds

return value
null


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

Set the color of a LED in coordinate mode

parameter list

nametyperangedefaultdescription
xposuint8_t0 ~ 255 0coordinate x
yposuint8_t0 ~ 255 0coordinate y
ColorCRGB--Color of Led

return value
null


    void drawpix(uint8_t Number, CRGB Color)

Set the color of a LED

parameter list

nametyperangedefaultdescription
Numberuint8_t0 ~ 255 0number of Led
ColorCRGB--Color of Led

return value
null


    void fillpix(CRGB Color)

Set the color of all LEDs

parameter list

nametyperangedefaultdescription
ColorCRGB--Color of Leds

return value
null


    void clear()

Close all of LEDs

parameter list
null

return value
null

About

M5Stack Atom Arduino Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 96.4%
  • C 3.6%