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.
Dependencies: EthernetInterface TMP102 TextLCD mbed-rtos mbed
Display.cpp@1:635e76c52151, 2014-03-16 (annotated)
- Committer:
- seppeduwe
- Date:
- Sun Mar 16 15:08:10 2014 +0000
- Revision:
- 1:635e76c52151
- Parent:
- 0:ae3af7d18c4a
Main goed
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| seppeduwe | 0:ae3af7d18c4a | 1 | #include "Display.h" |
| seppeduwe | 0:ae3af7d18c4a | 2 | #include "TextLCD.h" |
| seppeduwe | 0:ae3af7d18c4a | 3 | |
| seppeduwe | 0:ae3af7d18c4a | 4 | Display::Display() |
| seppeduwe | 0:ae3af7d18c4a | 5 | { |
| seppeduwe | 0:ae3af7d18c4a | 6 | lcd = new TextLCD(p14, p16, p17, p18, p19, p20); // rs, e, d4-d7 |
| seppeduwe | 0:ae3af7d18c4a | 7 | } |
| seppeduwe | 0:ae3af7d18c4a | 8 | |
| seppeduwe | 0:ae3af7d18c4a | 9 | //set the text on the display |
| seppeduwe | 0:ae3af7d18c4a | 10 | void Display::setText(char* text) |
| seppeduwe | 0:ae3af7d18c4a | 11 | { |
| seppeduwe | 1:635e76c52151 | 12 | lcd->cls(); |
| seppeduwe | 0:ae3af7d18c4a | 13 | lcd->locate(0,0); |
| seppeduwe | 0:ae3af7d18c4a | 14 | lcd->printf(text); |
| seppeduwe | 1:635e76c52151 | 15 | } |
| seppeduwe | 1:635e76c52151 | 16 | //set the advanced text on the display |
| seppeduwe | 1:635e76c52151 | 17 | void Display::setText(char* text, int value) |
| seppeduwe | 1:635e76c52151 | 18 | { |
| seppeduwe | 1:635e76c52151 | 19 | lcd->cls(); |
| seppeduwe | 1:635e76c52151 | 20 | lcd->locate(0,0); |
| seppeduwe | 1:635e76c52151 | 21 | lcd->printf(text,value); |
| seppeduwe | 0:ae3af7d18c4a | 22 | } |