Water control
/
Water_pump
start
Diff: main.cpp
- Revision:
- 1:924bead61d21
- Parent:
- 0:aa60e0772af6
--- a/main.cpp Wed Jun 07 14:55:01 2017 +0000 +++ b/main.cpp Tue Jun 27 20:54:33 2017 +0000 @@ -1,21 +1,19 @@ -#include "mbed.h" -#include "TextLCD.h" - -TextLCD lcd(p25, p26, p24, p23, p22, p21); // rs, e, A4-A7 -DigitalIn sw1(p5); -AnalogIn sal(p15); - +#include "general_control.h" +#include "temp.h" +#include "salinity.h" +//#include "calibration.h" +//extern bool rfl_flag; +//extern Serial pc; + int main() { + bool sal_state, temp_state; + initialization(); + while(1){ - lcd.cls(); - /* lcd.printf("Switch One is \n"); - if(sw1==true){ - lcd.printf("On"); - } - else{ - lcd.printf("Off"); - }*/ - lcd.printf("Vout = %f", 3.3*sal.read()); - wait(0.2); + //calibrate('a', "left"); + sal_state = salinity_control(); + //temp_state = temp_control(); + //normality_test(sal_state, temp_state); + wait(1); } } \ No newline at end of file