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.
Dependents: RF22_MAX_test_Send
TextLCDScroll Class Reference
TextLCDScroll class which handles horizontal scrolling text if it doesn't fit in one line, based on class TextLCD. More...
#include <TextLCDScroll.h>
Public Types | |
| enum | ScrollModes { leftright, left } |
How should we scroll horizontal in one line. More... | |
Public Member Functions | |
| TextLCDScroll (PinName rs, PinName e, PinName d4, PinName d5, PinName d6, PinName d7, TextLCD::LCDType type) | |
| Create a TextLCDScroll Object with pins and Type from TextLCD. | |
| bool | setLine (int Line, char *str) |
| Display a string str on line Line. | |
| bool | setSpeed (int speed) |
| Set the speed, how fast to scroll the text in Characters per Second. | |
| bool | setScrollMode (ScrollModes mode) |
| Set the Scroll-Mode. | |
Detailed Description
TextLCDScroll class which handles horizontal scrolling text if it doesn't fit in one line, based on class TextLCD.
Example:
#include "TextLCDScroll.h" #include "mbed.h" TextLCDScroll lcd(p30, p29, p28, p27, p26, p25, TextLCD::LCD16x2); // rs, e, d0-d3 int main() { lcd.cls(); lcd.setLine(0,"TextLCDScroll!"); lcd.setLine(1,"This line can be rather long. The quick brown fox jumps over the lazy dog."); }
Definition at line 46 of file TextLCDScroll.h.
Member Enumeration Documentation
| enum ScrollModes |
How should we scroll horizontal in one line.
Definition at line 51 of file TextLCDScroll.h.
Constructor & Destructor Documentation
| TextLCDScroll | ( | PinName | rs, |
| PinName | e, | ||
| PinName | d4, | ||
| PinName | d5, | ||
| PinName | d6, | ||
| PinName | d7, | ||
| TextLCD::LCDType | type | ||
| ) |
Create a TextLCDScroll Object with pins and Type from TextLCD.
- Parameters:
-
rs Instruction/data control line e Enable line (clock) d4-d7 Data lines for using as a 4-bit interface type Sets the panel size/addressing mode (default = LCD16x2)
Definition at line 5 of file TextLCDScroll.cpp.
Member Function Documentation
| bool setLine | ( | int | Line, |
| char * | str | ||
| ) |
Display a string str on line Line.
Replaces old text on this Line.
- Parameters:
-
Line Line, where text should be displayed. first Line=0 *str the string to display (c-string)
Definition at line 35 of file TextLCDScroll.cpp.
| bool setScrollMode | ( | ScrollModes | mode ) |
Set the Scroll-Mode.
Deault "left"
- Parameters:
-
mode a valid mode. See ScrollModes
Definition at line 81 of file TextLCDScroll.cpp.
| bool setSpeed | ( | int | speed ) |
Set the speed, how fast to scroll the text in Characters per Second.
- Parameters:
-
speed Speed for scrolling in Characters per Second. Range 0.1 ... 10
Definition at line 69 of file TextLCDScroll.cpp.
Generated on Tue Jul 12 2022 19:38:16 by
1.7.2