display works

comboLock
Jonas Wittstrøm 2 years ago
parent c1fda6bfdb
commit 1b39cb59e5

@ -17,3 +17,4 @@ monitor_speed = 115200
lib_deps =
knolleary/PubSubClient@^2.8
bblanchon/ArduinoJson@^6.21.3
marcoschwartz/LiquidCrystal_I2C@^1.1.4

@ -0,0 +1,30 @@
#include <Arduino.h>
#include <LiquidCrystal_I2C.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
const char *ssid = "PET Aflytningsvogn #43";
const char *password = "zwr33htm";
const char *mqtt_server = "192.168.24.215";
// set the LCD number of columns and rows
int lcdColumns = 16;
int lcdRows = 2;
// set LCD address, number of columns and rows
LiquidCrystal_I2C lcd(0x3f, lcdColumns, lcdRows);
void setup(){
lcd.init();
lcd.backlight();
}
void loop(){
// set cursor to first column, first row
lcd.setCursor(0, 0);
// print message
lcd.print("Piss off, ghosts!");
// clears the display to print new message
lcd.clear();
}
Loading…
Cancel
Save