David Baldeon
/
serial_publicacion
AVANCES MICROPROCESADORES
main.cpp
- Committer:
- dibbrowing
- Date:
- 2020-02-01
- Revision:
- 0:f58ee3dfd8d2
File content as of revision 0:f58ee3dfd8d2:
#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"); }