Water control
/
Water_pump
start
Diff: main.cpp
- Revision:
- 0:aa60e0772af6
- Child:
- 1:924bead61d21
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jun 07 14:55:01 2017 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" +#include "TextLCD.h" + +TextLCD lcd(p25, p26, p24, p23, p22, p21); // rs, e, A4-A7 +DigitalIn sw1(p5); +AnalogIn sal(p15); + +int main() { + 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); + } +} \ No newline at end of file