Blynk: M5Stack ATOM Matrix
atom_blynk_led_test
code: main.cpp
char auth[] = "?????"; // type the Auth Token you got for your project via email
char ssid[] = "?????"; // type SSID for your AP
char pass[] = "?????"; // type Password for your AP
int pinValue = 0;
BLYNK_WRITE(V0) {
pinValue = param.asInt();
Serial.print("V1 Slider value is: ");
Serial.println(pinValue);
}
BLYNK_READ(V1) {
Blynk.virtualWrite(V1, pinValue);
}
void setup() {
M5.begin(true, false, true);
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
}
void loop() {
Blynk.run();
int color_code = pinValue << 16 | pinValue << 8 | pinValue;
for (int pos = 0; pos < 25; pos++) {
M5.dis.drawpix(pos, color_code);
}
}