Heliowatcher

https://github.com/sciguy14/HelioWatcher/tree/master/Code/HelioWatcher single char puts between two devices over serial 
=== serial ===
https://github.com/sciguy14/HelioWatcher/blob/master/Code/HelioWatcher/HelioWatcher.c
//string trimming
char *trim(char *s) {
 char *ptr;
 if (!s)
 return NULL; // handle NULL string
 if (!*s)
 return s; // handle empty string
 for (ptr = s + strlen(s) - 1; (ptr >= s) && isspace(*ptr); --ptr);
 ptr[1] = '\0';
 return s;
}
https://github.com/sciguy14/Arduino-Tutorial-Series/tree/master/06%20Serial%20Comm%20and%20Processing
=== links ===
State machine
Category:Arduino