Greetings,
I am using the Arduino IDE 1.0 on a Mac running OSX 10.7.4
The hardware I'm programming is a Arduino Uno Rev 3.
I'm trying to read an unknown length string of ASCII characters terminated with a line feed from the UART on the Arduino from an external source. Lets just say from the Serial monitor in the Arduino IDE. I assumed readBytesUntil would be the simplest way but I keep getting the error: no matching function for call to 'HardwareSerial::readBytesUntil(int&, String&)'
I have done my due diligence trying to understand the error, but I'm just not getting it. So here is my simple code.
// Library Code To Include.
#include <OneWire.h>
#include <LiquidCrystal.h>
// Compiler/Library Initialization.
// Tell Library What Pins The LCD Is Connected To.
LiquidCrystal lcd(12,11,5,4,3,2); // RS,Enable,D4,D5,D6,D7
//Initialization/Setup Code Begins Here
void setup() {
Serial.begin(9600); // Start The Serial UART at 9600 Baud. Test Code Comment Out.
lcd.begin(16,2); // Tell Library How Many Columns And Rows The LCD Has.
}
void loop() {
String serialdata = "0";
int lf = 10;
Serial.readBytesUntil(lf, serialdata);
lcd.setCursor(0,0);
lcd.print(serialdata);
}
Can anyone point me in the right direction or am I not understanding the usage of readBytesUntil. There is no example usage on the Arduino website. Thank you in advance for any help or direction.