Hope some one here can help us!
We are using the Arduino Starter Kit to do some testing with Unity3D, and for the most part seems to work fairly well EXCEPT for this:
When we send messages to the LCD display through the standard loop function, we are using the serial.read() function to parse some characters to dataLine1 and dataLine2 as shown in the following code snippet:
void loop() {
if (Serial.available() > 0) {
dataLine1 = ...
dataLine2 = ...
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(dataLine1);
lcd.setCursor(0, 1);
lcd.print(dataLine2);
}
...
}
It all works well until it suddenly stops updating the LCD! We think that the lcd.clear() simply stops working.
We know the UNO board is still functioning properly because it sends messages back into our Unity3D setup without any issue. Very frustrating as its extremely unreliable and consistently fails after several loop cycles. I am also trying to avoid using delay() in our code as well as this negatively impacts our real-time nature requirements.
Any ideas how to fix this so it does not occur ?
Thanks in advance for any suggestions.