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
Diff: SalinityController.cpp
- Revision:
- 1:eb527bc93b62
- Parent:
- 0:dab140a197e0
- Child:
- 4:4011a1562a77
diff -r dab140a197e0 -r eb527bc93b62 SalinityController.cpp --- a/SalinityController.cpp Fri Jun 03 14:24:25 2016 +0000 +++ b/SalinityController.cpp Mon Jun 06 11:59:23 2016 +0000 @@ -1,7 +1,5 @@ #include "SalinityController.h" -#include "stdio.h" - AnalogIn salinity_sensor(p19); SalinityController::SalinityController() @@ -37,6 +35,8 @@ // Convert average sensor value to value with range 0-5.0v voltage = analogin_value * 3.3f * (5.0f/3.0f); + printf("Sensor Voltage: %f \t", voltage); + // Convert voltage to ppt ppt = voltage * 16.3;