using LCD class

This commit is contained in:
Martin Brodbeck 2022-05-30 16:09:42 +02:00
parent 165e9912dd
commit b084a2df64

View file

@ -1,14 +1,24 @@
#include <iostream> #include <iostream>
#include "hardware/i2c.h"
#include "pico/stdlib.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(); stdio_init_all();
while (true) { uint8_t data = 0;
std::cout << "Hello, world!" << std::endl; int ret{0};
//TODO: Read temperature
sleep_ms(750); auto myLCD = LCD(i2c1, I2C_SDA_PIN, I2C_SCL_PIN, I2C_ADDR);
}
myLCD.backlight_on();
std::cout << "FINISHED!" << std::endl;
} }