212 void setCursor( uint8_t row, uint8_t col );
252 virtual size_t write(
char c );
263 virtual size_t write(
const char* str );
275 virtual size_t write(
const char* buffer,
size_t size );
287 virtual size_t write(
const uint8_t* buffer,
size_t size );
294 virtual void flush();
301 kWriteFourBitsSendChar = 0,
302 kWriteFourBitsSendCommand = 1
307 size_t write( uint8_t value );
308 int writeFourBitsToLcd( uint8_t value, uint8_t gpioB );
309 int sendCharOrCmdToLcd( uint8_t value,
bool isCommand );
311 int sendCommand( uint8_t cmd )
313 return sendCharOrCmdToLcd( cmd, kWriteFourBitsSendCommand );
316 int sendCharToDisplay( uint8_t value )
318 return sendCharOrCmdToLcd( value, kWriteFourBitsSendChar );
321 uint8_t mDisplayControl;
322 uint8_t mDisplayMode;
324 volatile uint8_t mI2cStatus;
void displayBottomRow(const char *str)
Display a C-string on the bottom row.
Definition: I2cLcd.cpp:567
void blinkOff()
Do not blink the cursor.
Definition: I2cLcd.cpp:511
void clearTopRow()
Clear the top row.
Definition: I2cLcd.cpp:576
This is an abstract class defining a generic interface to write numbers and strings to a sequential s...
Definition: Writer.h:63
Backlight blue.
Definition: I2cLcd.h:83
void scrollDisplayLeft()
Scroll the display to the left.
Definition: I2cLcd.cpp:528
void cursorOn()
Display the cursor.
Definition: I2cLcd.cpp:503
Backlight yellow.
Definition: I2cLcd.h:80
uint8_t readButtons()
Read the state of the buttons associated with the LCD display.
Definition: I2cLcd.cpp:686
the Select button
Definition: I2cLcd.h:66
Backlight teal.
Definition: I2cLcd.h:82
void displayOff()
Turn the display off.
Definition: I2cLcd.cpp:479
This class provides a high-level interface via I2C to an LCD such as those offered by AdaFruit and Sp...
Definition: I2cLcd.h:57
int init()
Initialize the I2cLcd object. This must be called before using the I2cLcd, or calling any of the othe...
Definition: I2cLcd.cpp:219
virtual size_t write(char c)
Write a single character to the LCD at the current cursor location. This implements the pure virtual ...
Definition: I2cLcd.cpp:602
void autoscrollOn()
Turn on automatic scrolling of the display.
Definition: I2cLcd.cpp:542
void clear()
Clear the display (all rows, all columns).
Definition: I2cLcd.cpp:449
int setBacklight(uint8_t color)
Set the backlight to a given color. Set a black-and-white LCD display to White if you want to have a ...
Definition: I2cLcd.cpp:659
void command(uint8_t cmd)
Pass a command to the LCD.
the Right button
Definition: I2cLcd.h:67
Backlight green.
Definition: I2cLcd.h:81
the Left button
Definition: I2cLcd.h:70
Backlight violet.
Definition: I2cLcd.h:84
the Down button
Definition: I2cLcd.h:68
This file provides a generic interface to outgoing data streams of any kind. It is designed around ho...
Backlight white.
Definition: I2cLcd.h:85
virtual void flush()
This function does nothing. It simply implements the pure virtual function Writer::flush().
Definition: I2cLcd.cpp:651
void blinkOn()
Blink the cursor.
Definition: I2cLcd.cpp:519
I2cLcd()
Constructor simply initializes some internal bookkeeping.
Definition: I2cLcd.cpp:210
void clearBottomRow()
Clear the bottom row.
Definition: I2cLcd.cpp:583
void displayTopRow(const char *str)
Display a C-string on the top row.
Definition: I2cLcd.cpp:559
void displayOn()
Turn the display on.
Definition: I2cLcd.cpp:487
the Up button
Definition: I2cLcd.h:69
Backlight red.
Definition: I2cLcd.h:79
void scrollDisplayRight()
Scroll the display to the right.
Definition: I2cLcd.cpp:535
void cursorOff()
Hide the cursor.
Definition: I2cLcd.cpp:495
void home()
Move the cursor home (the top row, left column).
Definition: I2cLcd.cpp:457
void setCursor(uint8_t row, uint8_t col)
Move the cursor the a particular row and column.
Definition: I2cLcd.cpp:465
void autoscrollOff()
Turn off automatic scrolling of the display.
Definition: I2cLcd.cpp:550