Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By rudy
#51492 At startup I have some values written to an lcd connected to the ESP8266 via I2C. I print the WiFi.hostname() on the first line, a second counter (in loop()) on the second half of the first line. I print "IP:", and then the ip address on the second line. On the third line I wrote the ip address in HEX. (the order is reversed for some reason). On the fourth line I print ESP.getFlashChipRealSize().

With the counter and the "IP:" write I get exactly what I expect. But when I have the rest of the information printed(with function calls) I end up with a couple of extra characters at the end. When I use Serial.print() these characters do not appear on the serial terminal. (as expected)

What is going on here? I would think that how I performed the operation is valid.

Image

Code: Select all  lcd.setCursor(0, 1);
  lcd.print("IP: ");
  lcd.setCursor(3, 1); 
  lcd.println(WiFi.localIP());
 
  lcd.setCursor(0, 0);
  lcd.println(WiFi.hostname());

  Serial.println(WiFi.localIP(),HEX);
  lcd.setCursor(0, 2);
  lcd.println(WiFi.localIP(),HEX); 
 
  lcd.setCursor(0, 3);
  lcd.println(ESP.getFlashChipRealSize()); 

User avatar
By martinayotte
#51493 That is completely normal since the difference between print() and println() is that last one send also CR+LF, but those CR_LF characters are mapped to those 2 graphics in the LCD fonts.
So, simply use print() and forget about using println()