Arduino + Stellarium with Meade lx200 Protocol

The log i posted is generated by the stellarium telescope plugin, i'll post the sources of the plugin only as attachment, you have to take a look at Server-->the lx200 ones.

and for my sketch code, here it is:

void setup() {
  Serial.begin(9600);
}
String stringOne = "";
void loop() {
  if (Serial.available()){
    while (Serial.available()>0){ 
      char a=Serial.read();            // Stores current byte
      stringOne += String(a);          // Append current Byte to message String
      delay(10);
    }
    if (stringOne == "#:GR#"){         // if command received = get RA do...
      Serial.println("03:00:00#");
    }
    if (stringOne == "#:GD#"){         // if command received = get DEC do...
      Serial.print("+45*00#");
    }
    stringOne = "";
  }
}

TelescopeControlPlugin src.zip (97.8 KB)