I would like to add the ability to read a string from the serial console to my sketch. It should read from the serial port until the user hits the enter key. I tried:
Serial.readBytesUntil ( 13, buf, sizeof(buf) );
And variations (tried a 10 instead of 13), but couldn't make it do what I thought it should. I even tried with 65 (and 'A') but it didn't seem to stop when I hit the letter A.
Is there a sample sketch that uses this function that I could play around with? I'm using a Teensy 3.1
Serial.readBytesUntil ( 13, buf, sizeof(buf) );
And variations (tried a 10 instead of 13), but couldn't make it do what I thought it should. I even tried with 65 (and 'A') but it didn't seem to stop when I hit the letter A.
Is there a sample sketch that uses this function that I could play around with? I'm using a Teensy 3.1