From a52c1b94b8fabe2536c847691f8271f269d2314f Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 30 May 2022 21:36:56 +0200 Subject: [PATCH] More on LCD --- gbmanager.cpp | 5 ++--- lcd.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gbmanager.cpp b/gbmanager.cpp index ba705cc..c051d98 100644 --- a/gbmanager.cpp +++ b/gbmanager.cpp @@ -7,15 +7,14 @@ constexpr uint I2C_SDA_PIN = 26; constexpr uint I2C_SCL_PIN = 27; -constexpr uint8_t I2C_ADDR = 0x27; int main() { // Enable UART so we can print status output stdio_init_all(); - auto myLCD = LCD(i2c1, I2C_SDA_PIN, I2C_SCL_PIN, I2C_ADDR); + auto myLCD = LCD(i2c1, I2C_SDA_PIN, I2C_SCL_PIN); myLCD.sendString("Hallo, Welt"); myLCD.clear(); - myLCD.sendString("le"); + myLCD.sendString("Hallo, Wölt!"); } \ No newline at end of file diff --git a/lcd.h b/lcd.h index 87fe3d9..f6c3875 100644 --- a/lcd.h +++ b/lcd.h @@ -16,7 +16,7 @@ class LCD { public: LCD(i2c_inst_t *i2c, const uint gpio_sda, const uint gpio_scl, - const uint8_t i2c_addr, uint8_t num_cols = 16, uint8_t num_lines = 2); + const uint8_t i2c_addr = 0x27, uint8_t num_cols = 16, uint8_t num_lines = 2); int backlight_off(); int backlight_on(); void sendString(const std::string &str);