Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
WattBob_TextLCD Class Reference
Class to access 16*2 LCD display connected to an MCP23017 I/O extender chip. More...
#include <WattBob_TextLCD.h>
Public Member Functions | |
WattBob_TextLCD (MCP23017 *port) | |
Create TextLCD object connected to a MCP23017 device. | |
virtual void | locate (int row, int column) |
Set cursor to a known point. | |
virtual void | cls () |
clear display | |
virtual void | reset () |
reset the display |
Detailed Description
Class to access 16*2 LCD display connected to an MCP23017 I/O extender chip.
Derived from the "stream" class to be able to use methods such as "printf"
Example :
..... #include "MCP23017.h" #include "WattBob_TextLCD.h" ..... MCP23017 *par_port; WattBob_TextLCD *lcd; ..... int main() par_port = new MCP23017(p9, p10, 0x40); par_port->config(0x0F00, 0x0F00, 0x0F00); // configure MCP23017 chip on WattBob lcd = new WattBob_TextLCD(par_port); par_port->write_bit(1,BL_BIT); // turn LCD backlight ON lcd->cls(); lcd->locate(0,0); lcd->printf("%s", message); lcd->locate(1,0);lcd->printf("press 1 to cont");
Definition at line 101 of file WattBob_TextLCD.h.
Constructor & Destructor Documentation
WattBob_TextLCD | ( | MCP23017 * | port ) |
Create TextLCD object connected to a MCP23017 device.
- Parameters:
-
port pointer to MCP23017 object
Definition at line 46 of file WattBob_TextLCD.cpp.
Member Function Documentation
void cls | ( | ) | [virtual] |
void locate | ( | int | row, |
int | column | ||
) | [virtual] |
Set cursor to a known point.
Virtual function for stream class
- Parameters:
-
row integer row number (0 or 1) col integer column number (0 or 15)
Definition at line 111 of file WattBob_TextLCD.cpp.
void reset | ( | void | ) | [virtual] |
reset the display
Virtual function for stream class
Definition at line 129 of file WattBob_TextLCD.cpp.
Generated on Wed Jul 13 2022 00:50:23 by
