Adding characters to string

Posted by Jamza on Stack Overflow See other posts from Stack Overflow or by Jamza
Published on 2010-03-26T23:28:15Z Indexed on 2010/03/26 23:33 UTC
Read the original article Hit count: 138

Filed under:
|
|

I am currently trying to build a very basic serial shell with my arduino.

I am able to get an output from the device using Serial.read() and can get the character it has outputted, but I cannot work out how to then add that character to a longer to form the full command.

I tried the logical thing but it doesn't work:

char Command[];

void loop(){
  if(Serial.available() > 0){
    int clinput = Serial.read();
    Command = Command + char(clinput);
}

Can anybody help? Thank You.

© Stack Overflow or respective owner

Related posts about c

    Related posts about c++