Sample program for based on LM393 Raindrop sensor, just have one function, return TRUE or FALSE

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Yifan_Du
Date:
Fri Feb 08 06:58:05 2019 +0000
Parent:
0:bbeffbedaccb
Commit message:
Corrector

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r bbeffbedaccb -r bc4d3b9054d0 main.cpp
--- a/main.cpp	Fri Feb 08 06:53:18 2019 +0000
+++ b/main.cpp	Fri Feb 08 06:58:05 2019 +0000
@@ -25,17 +25,18 @@
 
 #include "mbed.h"
 #include "Raindrop.h"
-
+//                 A0    D0
 Raindrop Raindrop(PC_2, PC_3);
 
 int main(void)
 {
     while(1)
     {
-        if(Raindrop.Check_Raindrip() == false)
+        if(Raindrop.Check_Raindrop() == false)
             printf("Not rain\r\n");
         else
-            printf("Rain now\r\n")
+            printf("Rain now\r\n");
+            
         wait(1);
     }
 }
\ No newline at end of file