
Arduino Quick Start
APIs and example programs for the PaperMono RGB LED.
M5PaperMonoThe RGB LED integrated on the side of PaperMono has its red channel controlled by M5PM1 LED_EN_PP, while its green and blue channels are controlled by M5IOE1 PYG8 and PYG89. Arduino can use M5Unified's M5.Led to set the color and brightness together.
#include <M5Unified.h>
void setup()
{
auto cfg = M5.config();
cfg.clear_display = false;
M5.begin(cfg);
M5.Led.setAutoDisplay(false);
M5.Led.setBrightness(80);
}
void loop()
{
M5.update();
M5.Led.setAllColor(255, 0, 0);
M5.Led.display();
delay(1000);
M5.Led.setAllColor(0, 255, 0);
M5.Led.display();
delay(1000);
M5.Led.setAllColor(0, 0, 255);
M5.Led.display();
delay(1000);
M5.Led.setAllColor(255, 255, 255);
M5.Led.display();
delay(1000);
}
The PaperMono RGB LED features use Led_Class from the M5Unified library. For more information, refer to the following documentation: