diff --git a/platformio.ini b/platformio.ini index 7bdceac..5fcf6d5 100644 --- a/platformio.ini +++ b/platformio.ini @@ -17,3 +17,4 @@ monitor_speed = 115200 lib_deps = knolleary/PubSubClient@^2.8 bblanchon/ArduinoJson@^6.21.3 + marcoschwartz/LiquidCrystal_I2C@^1.1.4 diff --git a/src/display.cpp b/src/display.cpp new file mode 100644 index 0000000..3df3c70 --- /dev/null +++ b/src/display.cpp @@ -0,0 +1,30 @@ +#include +#include +#include +#include + +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(); +} \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp.dis similarity index 100% rename from src/main.cpp rename to src/main.cpp.dis