programa de librerías viejas de mbed básico

Dependencies:   ArduinoMotorShield MPU6050 mbed

Files at this revision

API Documentation at this revision

Comitter:
SantiagoE
Date:
Tue Sep 20 04:09:19 2022 +0000
Commit message:
librerias de base mbed viejito

Changed in this revision

ArduinoMotorShield.lib Show annotated file Show diff for this revision Revisions of this file
MPU6050.lib Show annotated file Show diff for this revision Revisions of this file
home.bld 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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 8d9cffd05dcc ArduinoMotorShield.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ArduinoMotorShield.lib	Tue Sep 20 04:09:19 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/johnb/code/ArduinoMotorShield/#b6bd7c434ab5
diff -r 000000000000 -r 8d9cffd05dcc MPU6050.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MPU6050.lib	Tue Sep 20 04:09:19 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Sissors/code/MPU6050/#5c63e20c50f3
diff -r 000000000000 -r 8d9cffd05dcc home.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/home.bld	Tue Sep 20 04:09:19 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/82220227f4fa
\ No newline at end of file
diff -r 000000000000 -r 8d9cffd05dcc main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Sep 20 04:09:19 2022 +0000
@@ -0,0 +1,75 @@
+#include "mbed.h"
+BusOut A (D0,D1,D2,D3,D4,D5,D6);
+BusOut B (D7,D8,D9,D10);
+int unidades=64, decenas=64, centenas=64, Umil=64;
+int g=1, h=10, j=9, i=9;
+Ticker tempo;
+void unidad(){
+    switch(g){
+        case 1:unidades=121;break;
+        case 2:unidades=36;break;
+        case 3:unidades=48;break;
+        case 4:unidades=25;;break;
+        case 5:unidades=18;break;
+        case 6:unidades=2;break;
+        case 7:unidades=120;break;
+        case 8:unidades=0;break;
+        case 9:unidades=16;break;
+        case 10:unidades=64;g=0;h=h+1;break;
+        }
+    g=g+1;
+    switch(h){
+        case 1:decenas=121;break;
+        case 2:decenas=36;break;
+        case 3:decenas=48;break;
+        case 4:decenas=25;;break;
+        case 5:decenas=18;break;
+        case 6:decenas=2;break;
+        case 7:decenas=120;break;
+        case 8:decenas=0;break;
+        case 9:decenas=16;break;
+        case 10:decenas=64;h=0;j=j+1;break;
+        }
+    switch(j){
+        case 1:centenas=121;break;
+        case 2:centenas=36;break;
+        case 3:centenas=48;break;
+        case 4:centenas=25;;break;
+        case 5:centenas=18;break;
+        case 6:centenas=2;break;
+        case 7:centenas=120;break;
+        case 8:centenas=0;break;
+        case 9:centenas=16;break;
+        case 10:centenas=64;j=0;i=i+1;break;
+        }
+    switch(i){
+        case 1:Umil=121;break;
+        case 2:Umil=36;break;
+        case 3:Umil=48;break;
+        case 4:Umil=25;;break;
+        case 5:Umil=18;break;
+        case 6:Umil=2;break;
+        case 7:Umil=120;break;
+        case 8:Umil=0;break;
+        case 9:Umil=16;break;
+        case 10:Umil=64;i=0;break;
+        }
+    }
+    void flip() {
+    led = !led;
+}       
+int main() {
+    tempo.attach(&unidad,0.2);
+    while(1) {
+            
+            A=unidades;B=1;
+            wait(0.005);
+            A=decenas;B=2;
+            wait(0.005);
+            A=centenas;B=4;
+            wait(0.005);
+            A=Umil;B=8;
+            wait(0.005);
+            
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 8d9cffd05dcc mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Sep 20 04:09:19 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file