Persianas Bluethoot

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Jamg
Date:
Fri Feb 19 14:39:43 2016 +0000
Parent:
0:e2590f0970fb
Commit message:
Pruebas iniciales

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r e2590f0970fb -r 34b7ca9fdc5a main.cpp
--- a/main.cpp	Fri Feb 19 13:14:49 2016 +0000
+++ b/main.cpp	Fri Feb 19 14:39:43 2016 +0000
@@ -1,12 +1,20 @@
 #include "mbed.h"
-
-DigitalOut motor(LED1);
+Serial puerto(PTE22,PTE23);
+PwmOut persiana(D2);
+DigitalIn arriba(D3);
+DigitalIn abajo(D4);
 
 int main() {
+    puerto.baud(9600);
+    
+    
     while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
-    }
-}
+        if (puerto.getc()=='up'){
+            
+        persiana = 1;
+        if (puerto.getc()=='down'){
+            
+        persiana = 1;
+        }}}
+        
+    }
\ No newline at end of file