Last active
June 19, 2019 20:17
-
-
Save MAKIO135/148a61887e4e4ca92b8d100135bae340 to your computer and use it in GitHub Desktop.
Update Kniwwelino board leds matrix using Serial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Update Kniwwelino board leds matrix using Serial | |
// https://doku.kniwwelino.lu/en/reference/matrixwhen sending data | |
#include <Kniwwelino.h> | |
String inputString = ""; | |
void setup() { | |
Kniwwelino.begin("yo", false, true, false); // Wifi=false, Fastboot=true, MQTT logging false | |
inputString.reserve(26); | |
Serial.println("waiting for data..."); | |
} | |
void loop() { | |
while (Serial.available()) { | |
char inChar = (char) Serial.read(); | |
if (inChar != '|') { | |
inputString += inChar; | |
} | |
else { | |
Serial.println(inputString); | |
Kniwwelino.MATRIXdrawIcon(inputString); | |
inputString = ""; | |
} | |
} | |
Kniwwelino.sleep(20); | |
Kniwwelino.loop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment