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@0:ae3af7d18c4a, 2014-03-14 (annotated)
- Committer:
- seppeduwe
- Date:
- Fri Mar 14 19:41:14 2014 +0000
- Revision:
- 0:ae3af7d18c4a
- Child:
- 1:635e76c52151
Nog voor klasse
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 | //setup the LCD |
| seppeduwe | 0:ae3af7d18c4a | 7 | lcd = new TextLCD(p14, p16, p17, p18, p19, p20); // rs, e, d4-d7 |
| seppeduwe | 0:ae3af7d18c4a | 8 | //print the initial text on it |
| seppeduwe | 0:ae3af7d18c4a | 9 | printf("LCD is up\n"); |
| seppeduwe | 0:ae3af7d18c4a | 10 | } |
| seppeduwe | 0:ae3af7d18c4a | 11 | |
| seppeduwe | 0:ae3af7d18c4a | 12 | //set the text on the display |
| seppeduwe | 0:ae3af7d18c4a | 13 | void Display::setText(char* text) |
| seppeduwe | 0:ae3af7d18c4a | 14 | { |
| seppeduwe | 0:ae3af7d18c4a | 15 | lcd->locate(0,0); |
| seppeduwe | 0:ae3af7d18c4a | 16 | //lcd->clr(); |
| seppeduwe | 0:ae3af7d18c4a | 17 | printf("Text %s\n\r", text); |
| seppeduwe | 0:ae3af7d18c4a | 18 | lcd->printf(text); |
| seppeduwe | 0:ae3af7d18c4a | 19 | } |