measuring the salinity
Dependencies: LinearAnalogSensors mbed
Fork of mbed_measuring_temperature by
Diff: main.cpp
- Revision:
- 10:3d1ffeb39123
- Parent:
- 7:b0d12907493f
- Child:
- 11:af86c88a58ba
--- a/main.cpp Tue Jun 14 09:28:30 2016 +0000 +++ b/main.cpp Tue Jun 14 13:42:14 2016 +0000 @@ -11,6 +11,7 @@ DigitalOut myled1(LED1), myled2(LED2); AnalogIn pin_1(p16), pin_2(p15), pin_3(p17) ; AnalogOut pin_18 (p18); +DigitalIn switchinput(p7); //LinearTemp mysensor(p15, 0.0050354, -273.15); char program_name[128] = "G3-Waterplay Project"; @@ -18,9 +19,12 @@ void salinityMeasurement(); void temperatureMeasurement(); - +void initialization (); int main() { + + initialization(); + while(1){ wait(2); salinityMeasurement(); @@ -72,5 +76,54 @@ myled1 = 0; } } + +void initialization(){ +int message=0; + while (message<8){ + + + + if (message==0){ + lcd.printf("Check the water tank \n"); + } + + if (message==1){ + lcd.printf("Check the solution tank \n"); + } + if (message==2){ + lcd.printf("Check the water tube \n"); + } + if (message==3){ + lcd.printf("Check the salinity tube \n"); + } + if (message==4){ + lcd.printf("Check the valves position \n"); + } + if (message==5){ + lcd.printf("Check the syrenge \n"); + } + if (message==6){ + lcd.printf("Check the sensor position \n"); + } + if (message==7){ + lcd.printf("Check the thermostat \n"); + } + + if (switchinput==1){ + message++; + wait(2); + lcd.cls(); + } + + } + + lcd.printf("System will start in 2 sec \n"); + wait(2); + lcd.cls(); +} + + + +