System function

begin()

Function:

Clear the serial port buffer and set the serial port baud rate to 115200. Initialize I2C. Initialize the LED matrix

Function prototype:

void begin(bool SerialEnable, bool I2CEnable, bool DisplayEnable);

Example:

#include "M5Atom.h"
void setup(){
    M5.begin(true, true, true); // Clear the serial port buffer and set the serial port baud rate to 115200. Initialize I2C. Initialize the LED matrix
}

update()

Function:

Read the state of the key

Function prototype:

void update()

Example:

void M5Atom::update()
{
    M5.Btn.read();
}
On This Page