// serialStr manages a serial port for you. When it recieves a
// complete string, it calls your choosen function to deal with it.
// And, it does all this, NON-BLOCKINGLY.
//
// Hide the mess of millis!
//
#include <serialStr.h>
serialStr serialManager;
void setup() {
Serial.begin(115200);
Serial.println("Type hallo.");
serialManager.setCallback(gotCom);
}
void gotCom(char* inStr) {
if (!strcmp(inStr,"hallo")) {
Serial.println("Good!");
} else {
Serial.println("Bad!");
}
}
void loop() { idle(); }