Hi, I'm a new user in here - and pretty new to the arduino environment. I am pretty used to building modules in Max/MSP and I want this 16x2 LCD display to show me what I am doing in Max. It all works fine so far, the LCD and the arduino is working and the serial object in max is succesfully converting symbols to ASCII and sending via the serial port.But I am having trouble with breaking the line and sending symbols to the second line on the display - the bottom line.

void setup(){ // set up the LCD's number of columns and rows: lcd.begin(16, 2); // initialize the serial communications: Serial.begin(38400);}

void loop(){ // when characters arrive over the serial port... if (Serial.available()) { // wait a bit for the entire message to arrive delay(10); // clear the screen lcd.clear(); // read all the available characters while (Serial.available() > 0) { // display each character to the LCD lcd.write(Serial.read()); } }}

Serial data transmission is relatively slow. You are clearing the screen, reading everything in the buffer, and starting loop over again. It is very unlikely that more than 16 characters will arrive on the serial port, while you are clearing the screen. So, there is never anything to wrap onto the second line.