ISISA-Zacatenco / Mbed 2 deprecated Cronometro_dos

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Javierdf
Date:
Sun Sep 22 03:08:44 2019 +0000
Commit message:
conometro dos

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Sep 22 03:08:44 2019 +0000
@@ -0,0 +1,50 @@
+
+#include "mbed.h"
+
+ 
+Ticker flipper;
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+
+
+/*Orden Segmentos: 
+a = PTA17
+b = PTB9
+c = PTA7
+d = PTA6
+e = PTA14
+f = PTA16
+g = PTA15
+pto =PTC16
+*/
+BusOut pines_disp(PTA17, PTB9, PTA7,PTA6,PTA14,PTA16,PTA15,PTC16);
+BusOut pines_transist(PTC9,PTC8,PTA5,PTA4,PTA12,PTD3);
+
+//Orden Segmentos: p,g,f,e;d,c,b,a
+int cod_disp[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};    
+int codigo_transist[6]={0x01,0x02,0x04,0x08,0x10,0x20};    
+int contador;
+int cont;
+// declaracion de variables del contador de tiempo
+
+
+void tiempo()
+{
+   int cont_min; 
+for(cont_min=0;cont_min<9;cont_min++)
+    wait(1);
+    
+    pines_disp=cod_disp[contador];
+   
+    }
+    
+int main() {
+    
+    
+    flipper.attach(&tiempo, 1); // the address of the function to be attached (flip) and the interval 
+    contador=0;
+    pines_transist=codigo_transist[contador];
+    contador=0;
+    
+
+    }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Sep 22 03:08:44 2019 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/856d2700e60b
\ No newline at end of file