#ifndef CHAR_LCD_H #define CHAR_LCD_H #include #define CHAR_LCD_I2C_NUM I2C_NUM_0 #define LCD_ADDR 0x27 #define LCD_COLS 20 #define LCD_ROWS 4 /// Initializes the 2004 Character LCD void init_lcd(); /// Clear the LCD void lcd_clear(); /// Move cursor to home position void lcd_cursor_home(); /// Set cursor position void lcd_set_cursor_pos(uint8_t col, uint8_t row); /// Turn the display on/off void lcd_set_display(bool display); /// Turn the cursor's visibility on/off void lcd_set_cursor_vis(bool cursor); /// Turn blinking cursor on/off void lcd_set_cursor_blink(bool blink); /// Scroll the display left void lcd_scroll_display_left(); /// Scroll the display right void lcd_scroll_display_right(); /// Set the text to flows automatically left to right void lcd_left_to_right(); /// Set the text to flows automatically right to left void lcd_right_to_left(); // Turn on/off autoscroll void lcd_set_autoscroll(bool autoscroll); // Set backlight brightness void lcd_set_backlight(uint8_t brightness); // Create a custom character void lcd_create_char(uint8_t location, uint8_t charmap[]); // Write a character to the LCD void lcd_write(uint8_t value); // Print a string to the LCD void lcd_print(const char* str); // Print a string to the LCD at a given pos void lcd_print(uint8_t col, uint8_t row, const char* str); #endif /* CHAR_LCD_H */