Skip to content

Instantly share code, notes, and snippets.

@s-light
Last active June 1, 2022 14:21
Show Gist options
  • Save s-light/30c9ae8bb61005990eee8d1322630fac to your computer and use it in GitHub Desktop.
Save s-light/30c9ae8bb61005990eee8d1322630fac to your computer and use it in GitHub Desktop.
Arduino LiquidCrystal_PCF8574 test sketches
#include <LiquidCrystal_PCF8574.h>
#include <Wire.h>
// LiquidCrystal_PCF8574 lcd(LCD_ADDRESS); → Default = 0x27;
LiquidCrystal_PCF8574 lcd(0x27);
void setup() {
Serial.begin(115200);
Serial.println("LiquidCrystal_PCF8574__HelloWorld");
lcd.begin(16, 2);
lcd.setBacklight(255);
lcd.home();
lcd.clear();
lcd.print("Hello LCD");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Hello World! :-)");
lcd.setCursor(0, 1);
lcd.print("(: Hallo Welt :)");
}
void loop(){
}
#include <LiquidCrystal_PCF8574.h>
#include <Wire.h>
// LiquidCrystal_PCF8574 lcd(LCD_ADDRESS); → Default = 0x27;
LiquidCrystal_PCF8574 lcd(0x27);
void setup() {
Serial.begin(115200);
Serial.println("LiquidCrystal_PCF8574__HelloWorld");
lcd.begin(20, 4);
lcd.setBacklight(255);
lcd.home();
lcd.clear();
lcd.print("Hello LCD");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Hello World! :-) ***");
lcd.setCursor(0, 1);
lcd.print("Es scheint die Sonne");
lcd.setCursor(0, 2);
lcd.print("Und Ich hab lust auf");
lcd.setCursor(0, 3);
lcd.print("ein Leckeres eis ;-)");
}
void loop(){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment