5#include <wiringPiI2C.h>
100 LCD1602(
const int LCDAddr,
const int fileDescriptor);
116 LCD1602(
const int LCDAddr,
const int fileDescriptor,
const int blen);
141 virtual void TurnOn()
override;
153 virtual void TurnOff()
override;
179 virtual std::string
ToString()
const override;
Abstract base class for every component (sensor, actuator, etc.) the library manages.
Definition: BaseComponent.h:60
Standard 16x2 character LCD screen (LCD1602) driven over I2C.
Definition: LCD1602.h:18
int myBLEN
Backlight enable flag (1 = on).
Definition: LCD1602.h:28
void ClearScreen()
Clears the screen.
Definition: LCD1602.cpp:282
LCD1602(const LCD1602 &)=delete
void SendData(const int data)
Sends a data byte to the LCD in two 4-bit nibbles, toggling the enable line for each.
Definition: LCD1602.cpp:183
virtual ~LCD1602()
Destroys the screen, turning it off first.
Definition: LCD1602.cpp:97
int myLCDAddress
The LCD's I2C address.
Definition: LCD1602.h:25
virtual void TurnOn() override
Initializes the LCD (8-bit then 4-bit mode, 2 lines, display on without cursor blink) and clears the ...
Definition: LCD1602.cpp:216
LCD1602 & operator=(const LCD1602 &)=delete
int myFileDescriptor
The open i2c device file descriptor.
Definition: LCD1602.h:26
void SendCommand(const int command)
Sends a command byte to the LCD in two 4-bit nibbles, toggling the enable line for each.
Definition: LCD1602.cpp:148
void WriteWord(const int word)
Writes a raw word to the LCD over I2C, setting or clearing the backlight bit according to the backlig...
Definition: LCD1602.cpp:120
virtual void ProcessRawValues() override
No-op: the LCD is an output device with no raw values to process.
Definition: LCD1602.cpp:267
bool myOwnsFileDescriptor
True if this component opened (and must close) the fd; false if borrowed.
Definition: LCD1602.h:27
virtual std::string ToString() const override
Serializes the LCD's I2C address, file descriptor, and backlight flag to a string.
Definition: LCD1602.cpp:352
virtual void TurnOff() override
Turns the display off.
Definition: LCD1602.cpp:250
void WriteToScreen(int &x, int &y, const char data[])
Writes a string starting at the given cursor position, clamping x to 0-15 and y to 0-1.
Definition: LCD1602.cpp:304
RumPi is the library's top-level facade.
Definition: AlertManager.h:6