Javier Nuñez
/
Contador
Decimal, ascii, hexadecimal
Revision 0:7e938a43da08, committed 2020-02-01
- 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 |
--- /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
--- /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