From b084a2df64b0510eacf50ca0685f08ec509009e0 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 30 May 2022 16:09:42 +0200 Subject: [PATCH] using LCD class --- gbmanager.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/gbmanager.cpp b/gbmanager.cpp index 87a43a7..ab2fa55 100644 --- a/gbmanager.cpp +++ b/gbmanager.cpp @@ -1,14 +1,24 @@ #include +#include "hardware/i2c.h" #include "pico/stdlib.h" -int main() -{ +#include "lcd.h" + +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(); - while (true) { - std::cout << "Hello, world!" << std::endl; - //TODO: Read temperature - sleep_ms(750); - } + uint8_t data = 0; + int ret{0}; + + auto myLCD = LCD(i2c1, I2C_SDA_PIN, I2C_SCL_PIN, I2C_ADDR); + + myLCD.backlight_on(); + + std::cout << "FINISHED!" << std::endl; } \ No newline at end of file