VOLTIMETRO

Dependencies:   BCDSEG mbed

Fork of Nucleo_blink_led by brian barreto

Files at this revision

API Documentation at this revision

Comitter:
briandk
Date:
Sat Aug 19 21:58:11 2017 +0000
Parent:
0:c9697e9b4944
Commit message:
VOLTIMETRO

Changed in this revision

BCDSEG.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r c9697e9b4944 -r dcd4e6ad0556 BCDSEG.lib
--- a/BCDSEG.lib	Sat Aug 12 21:19:45 2017 +0000
+++ b/BCDSEG.lib	Sat Aug 19 21:58:11 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/briandk/code/BCDSEG/#3d7ebc7de009
+https://developer.mbed.org/users/briandk/code/BCDSEG/#ad0edab33530
diff -r c9697e9b4944 -r dcd4e6ad0556 main.cpp
--- a/main.cpp	Sat Aug 12 21:19:45 2017 +0000
+++ b/main.cpp	Sat Aug 19 21:58:11 2017 +0000
@@ -1,20 +1,27 @@
+
 //CODIGO DE BCD A 7 SEGMENTOS: BRIAN BARRETO, ESTEFANO OCHOA, SEBASTIAN SOLORZANO
-
 #include "mbed.h"
 # include "DECO.h"
 
-int NUM;
-int dip;
-int main() {
-    sieteseg objeto;
-    objeto.Visual(D6,D7,D8,D9,D10,D11,D12); 
+
+AnalogIn pot(A1);
+float voltaje;
+int unic;
+int decc;
+int main()
+
+{ 
+    anodo Voltimetro;
+    Voltimetro.visual(D2,D3,D4,D5,D6,D7,D8);
     
-    while(1) {
-        NUM=objeto.entrada(D2,D3,D4,D5);    
-        objeto.bcd(NUM);
-        wait(0.3);
-              
+    
+    while(1) 
+    {
+        voltaje=pot.read_u16()*0.000050354;
+        decc=voltaje;
+        unic=((voltaje*10)-(decc*10));
+        Voltimetro.ConfEn(D9,D10,unic,decc,100);
+
     }
-    
 }