/************************************************************************************************** * * StringSerialProtocol * * Version: 1.1.2 - April 2009 * Author: Christoph Wartmann / chair for caad - ETH Zürich / wartmann[at]arch.ethz.ch * Etienne Ribeiro / tutorial assistant caad / eribeiro[at]ethz.ch * * Desc: A Protocoll to communicate through the Serial Interface. * ***************************************************************************************************/ // Setup void setup() { // LED (2 * blink) pinMode(48, OUTPUT); digitalWrite(48, HIGH); delay(200); digitalWrite(48, LOW); delay(200); digitalWrite(48, HIGH); // Initialize StringSerialProtocol Serial_Initialize (9600); Serial_setID (50); // ID will be sent (DON'T USE 10 or 13!!) } // Loop void loop() { Serial_check (); } // SerialEvent void SerialEvent (char cmd, char* message) { // Send message back Serial_sendMessage (cmd, message); }