Program for the water play project for the course Software Testing Practical 2016 given at the VU University
Dependencies: mbed DRV88255 TextLCD Ping mbed-rtos
LCDController.cpp@7:8b3aef52aa7b, 2016-06-10 (annotated)
- Committer:
- joran
- Date:
- Fri Jun 10 12:29:33 2016 +0000
- Revision:
- 7:8b3aef52aa7b
- Parent:
- 6:067e999b9c6e
- Child:
- 10:fd4670ec0806
- Child:
- 15:487e56550364
Salinity update
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joran | 6:067e999b9c6e | 1 | #include "LCDController.h" |
joran | 6:067e999b9c6e | 2 | |
joran | 6:067e999b9c6e | 3 | TextLCD lcd(p5, p6, p7, p8, p9, p10, TextLCD::LCD16x2); |
joran | 6:067e999b9c6e | 4 | |
joran | 6:067e999b9c6e | 5 | |
joran | 6:067e999b9c6e | 6 | |
joran | 6:067e999b9c6e | 7 | LCDController::LCDController() |
joran | 6:067e999b9c6e | 8 | { |
joran | 6:067e999b9c6e | 9 | printf("Initiate LCD Controller\n\r"); |
joran | 6:067e999b9c6e | 10 | lcd.cls(); |
joran | 6:067e999b9c6e | 11 | |
joran | 6:067e999b9c6e | 12 | } |
joran | 6:067e999b9c6e | 13 | |
joran | 6:067e999b9c6e | 14 | void LCDController::splash() |
joran | 6:067e999b9c6e | 15 | { |
joran | 6:067e999b9c6e | 16 | lcd.cls(); |
joran | 6:067e999b9c6e | 17 | lcd.printf("Welcome to\nSaltware"); |
joran | 6:067e999b9c6e | 18 | wait(2.0); |
joran | 6:067e999b9c6e | 19 | } |
joran | 6:067e999b9c6e | 20 | |
joran | 6:067e999b9c6e | 21 | void LCDController::updateScreen(float displaytemp, float saltvolt) |
joran | 6:067e999b9c6e | 22 | { |
joran | 6:067e999b9c6e | 23 | lcd.cls(); |
joran | 7:8b3aef52aa7b | 24 | lcd.printf("Temp: %.1fC\nSalt: %.3fPPT",displaytemp,saltvolt); |
joran | 6:067e999b9c6e | 25 | } |