LCD 20x4 via I2C problem >>löst<<
Postat: 31 juli 2020, 19:43:35
Har några LCD 20x4 som alla ger detta problemet. UNO med följande kod + i2c kort
Felet = LCD:n uppfattas som 2 radig enbart och bara första bokstaven i respektive lcd.print skrivs ut.
Någon som kan förklara vad som är fel vore jag tacksam.
Kod: Markera allt
// Arduino with PCF8574T I2C LCD example
#include <Wire.h> // Include Wire library (required for I2C devices)
#include <LiquidCrystal_I2C.h> // Include LiquidCrystal_I2C library
LiquidCrystal_I2C lcd(0x27,20,4); // Configure LiquidCrystal_I2C library with 0x27 address, 16 columns and 2 rows
void setup() {
lcd.init(); // Initialize I2C LCD module
lcd.backlight(); // Turn backlight ON
lcd.setCursor(0, 0); // Go to column 0, row 0
lcd.print("Hello, world!");
lcd.setCursor(0, 2); // Go to column 0, row 2
lcd.print("Arduino I2C LCD");
}
void loop() {
}
Någon som kan förklara vad som är fel vore jag tacksam.