Decimal, ascii, hexadecimal

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
javierdavid2006
Date:
Sat Feb 01 16:44:18 2020 +0000
Commit message:
Contador hecho en clase

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
diff -r 000000000000 -r 7e938a43da08 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Feb 01 16:44:18 2020 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+Serial device(PA_2,PA_3);
+int i = 1;
+
+int main()
+{
+    device.baud(115200);
+
+    i= 1;
+    device.printf("Envio en Decimal del 1 al 256 %d \r\n", i);//Envio en Digito
+    while(i <= 250) {
+        device.printf("%d\r", i);//Envio en Digito
+        //wait(0.2);
+        i++;
+    }
+
+    i = 1;
+    device.printf("Envio en ascii del 1 al 256 %c \r\n", i);
+    while(i <=250) {
+        device.printf("  %c\r", i);//Envio en Digito
+        //wait(0.2);
+        i++;
+
+    }
+    i = 1;
+    device.printf("Envio en hexadecimal del 1 al 256 %x \r\n", i);
+    while(i <=250) {
+        device.printf("%x\r", i);//Envio en Digito
+        //wait(0.2);
+        i++;
+
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 7e938a43da08 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Feb 01 16:44:18 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file