Button: M5Stack ATOM Matrix
atom_tutorial_button
code: main.cpp
#include
"M5Atom.h"
void setup() {
M5.begin(true, false, true);
}
void loop() {
if (M5.Btn.isPressed()) {
M5.dis.drawpix(0, 0, 0xffffff);
}
else {
M5.dis.drawpix(0, 0, 0x000000);
}
M5.update();
}
#M5Stack