// read serial and repeat to serial with added string
void setup()
{
Serial.begin(115200);
}
void loop()
{
string message[30];
string saluation[7];
string fullString[40];
int lf = 10;
if (Serial.available() > 0)
{
Serial.readBytesUntil(lf, message, 30);
saluation = 'I got ';
fullString = saluation + message;
Serial.println(fullString);
delay(1000);
}
}
When I try to compile, the orange bar says "error compiling", and there is no explanation below.
I know the way I'm doing this is kludgie, but I'm still new to C or C+.
Jim
There's a number of errors. First, there is no string data type. C++ supports the String data type, so case does make a difference. Second, readBytesUntil() expects the first argument to be a char, not an int. You could cast it, but why? Also, you are using more data than you really need.