// 2009 mlab.uiah.fi/paja // Echoing program (Return byte that is recieved from serial. char incomingByte = 0; // for incoming serial data //int incomingState = 0; ///*** Main functions ***/// void setup(){ // Start serial communication Serial.begin(9600); } void loop(){ // send data only when you receive data: //incomingState = 0; while (Serial.available() > 0) { // read the incoming byte: Serial.print(Serial.read(), BYTE); //inztercomingState = 1; } // if (Serial.available() == 0 && incomingState == 1) Serial.println(); }