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

Committer:
sbouber1
Date:
Fri Jun 10 22:21:04 2016 +0000
Revision:
10:fd4670ec0806
Parent:
7:8b3aef52aa7b
Child:
16:b9c4fd837909
Child:
17:17ea1372f64a
Optional threading

Who changed what in which revision?

UserRevisionLine numberNew 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 }
sbouber1 10:fd4670ec0806 26
sbouber1 10:fd4670ec0806 27 void LCDController::updateScreen(float distance) {
sbouber1 10:fd4670ec0806 28 lcd.cls();
sbouber1 10:fd4670ec0806 29 lcd.printf("Distance:\n%.3f", distance);
sbouber1 10:fd4670ec0806 30 }
sbouber1 10:fd4670ec0806 31
sbouber1 10:fd4670ec0806 32 void LCDController::error(const char *msg) {
sbouber1 10:fd4670ec0806 33 lcd.cls();
sbouber1 10:fd4670ec0806 34 lcd.printf("ERROR:\n%s", msg);
sbouber1 10:fd4670ec0806 35 }