AVANCES MICROPROCESADORES

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
dibbrowing
Date:
Sat Feb 01 17:49:55 2020 +0000
Commit message:
contador serial

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	Sat Feb 01 17:49:55 2020 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+
+DigitalOut myled(PD_13);
+Serial device(PA_2,PA_3);
+
+int i=0;
+int main() {
+    
+    device.baud(115200);
+    //device.printf("65A"); imprimir texto
+    //  device.printf("-");
+    //device.printf("%d",i);  //enviar entero
+    //device.printf("%c",i);  //enviar character
+    //device.printf("%x",i);   //enviar hexadecimal
+    //device.printf("\n");
+    i=0;
+    while(i<255) {
+        i++;
+        device.printf("%c\r",i);
+               } 
+    i=0;
+    while(i<255) {
+        i++;
+        device.printf("%d\r",i);
+            }  
+    i=0;  
+    while(i<255){ 
+        i++;
+        device.printf("%x\r",i);
+                }
+    //    device.printf("%c\r",i); //enviar fin de carrera\r
+    //device.printf("-");
+    //device.printf("%d",i);  //enviar entero
+    //device.printf("%c",i);  //enviar character
+    //device.printf("%x",i);   //enviar hexadecimal
+    //device.printf("\n");
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Feb 01 17:49:55 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file