Código para enviar un valor entero a binario para monitorear una variable con ayuda de app inventor

Dependencies:   mbed

Fork of VOLTIMETRO1 by Gustavo Ramirez

Files at this revision

API Documentation at this revision

Comitter:
tony63
Date:
Fri Apr 17 20:17:55 2015 +0000
Parent:
1:d0a4ddc1bd88
Commit message:
version corregida

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r d0a4ddc1bd88 -r 8a0e46a84596 main.cpp
--- a/main.cpp	Fri Apr 17 19:58:59 2015 +0000
+++ b/main.cpp	Fri Apr 17 20:17:55 2015 +0000
@@ -21,9 +21,9 @@
        GSM.format(8,Serial::None,1); 
                
        while(1){ 
-       med = input.read();   //leo puerto analogico
+                 //leo puerto analogico
        wait(0.5);
-       num = med*1000;      //agrando el numero de cero a mil
+       num = input*1000;      //agrando el numero de cero a mil
        if(num<256){           //debo generar dos casos a APP inventor solo me recibe hex asi: 0xhhhh (4 cifras)    
            GSM.putc(0);     //si el numero es hasta 255 se le ponen dos ceros adelante a la secuencia de bits
            GSM.putc(i);     //luego la cifra menos significativa