I’ve written this admittedly poor piece of code to test an oled display and it works ok except for extra semicolons that seem to appear at the end of every message you send via the serial monitor on the oled screen.
It’s an almost HD47780 compatible display, all I’m trying to do is get it to show a message when I type it in on the serial terminal.
Does anyone know why this semicolon appears, it only happens when a message is sent so I don’t think it’s an electronics issue? It doesn’t get echoed on the serial terminal, is it an extra character like CR or NL beingp ms-interpreted or is there another explanation?
#include <Adafruit_CharacterOLED.h>
Adafruit_CharacterOLED lcd(OLED_V2, 6, 7, 8, 9, 10, 11, 12);
String message ="Hello world";
void setup() {
Serial.begin(115200);
lcd.begin(16, 2);
lcd.clear();
delay(2000);
lcd.setCursor(0,0);
lcd.print("Starting......");
delay(1000);
lcd.clear();
}
void loop() {
message = Serial.readString();
Serial.println(message);
lcd.setCursor(0,0);
lcd.println(message);
delay(200);
}