LiquidCrystalAdapter

class LiquidCrystalAdapter : public CharacterDisplayInterface
#include <LiquidCrystalAdapter.h>

Adapter class for interfacing with LiquidCrystal displays.

This class provides an interface to control LiquidCrystal displays using the CharacterDisplayInterface. It includes methods for initializing the display, creating custom characters, setting the backlight, positioning the cursor, drawing text and characters, and managing a display timer.

Note

This class requires the LiquidCrystal library.

Param lcd:

Pointer to a LiquidCrystal object that this adapter will interact with.

Param maxCols:

The maximum number of columns on the display.

Param maxRows:

The maximum number of rows on the display.

Public Functions

inline LiquidCrystalAdapter(LiquidCrystal *lcd, uint8_t maxCols, uint8_t maxRows)
inline virtual void begin() override
inline virtual void createChar(uint8_t id, uint8_t *c)

Creates a custom character on the display.

Parameters:
  • id – The identifier for the custom character.

  • c – A pointer to an array representing the custom character.

inline virtual void clear() override
inline virtual void setBacklight(bool enabled) override
inline virtual void setCursor(uint8_t col, uint8_t row) override
inline virtual void draw(const char *text) override
inline virtual void draw(uint8_t byte) override
inline virtual void drawBlinker()

Draws a blinker on the display.

inline virtual void clearBlinker()

Clears the blinker from the display.

inline virtual void show() override
inline virtual void hide() override

Private Members

LiquidCrystal *lcd
uint8_t maxCols
uint8_t maxRows