Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@26:17dcdd3664fc, 2019-10-04 (annotated)
- Committer:
- rgsbuap
- Date:
- Fri Oct 04 16:19:02 2019 +0000
- Revision:
- 26:17dcdd3664fc
- Parent:
- 25:90e7333db6a7
Comunicacion serial (Ejemplo basico)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dan | 0:7dec7e9ac085 | 1 | #include "mbed.h" |
dan | 0:7dec7e9ac085 | 2 | |
rgsbuap | 26:17dcdd3664fc | 3 | |
rgsbuap | 26:17dcdd3664fc | 4 | //Serial port (UART) configuration |
rgsbuap | 26:17dcdd3664fc | 5 | Serial pc(USBTX,USBRX); |
dan | 0:7dec7e9ac085 | 6 | |
rgsbuap | 26:17dcdd3664fc | 7 | int main() |
rgsbuap | 26:17dcdd3664fc | 8 | { |
rgsbuap | 26:17dcdd3664fc | 9 | int8_t x=0; |
rgsbuap | 26:17dcdd3664fc | 10 | pc.printf("El tamano en bytes de int8_t es: %d \r\n",sizeof(int8_t)); |
rgsbuap | 26:17dcdd3664fc | 11 | |
rgsbuap | 26:17dcdd3664fc | 12 | while(1) |
rgsbuap | 26:17dcdd3664fc | 13 | { wait(0.2); |
rgsbuap | 26:17dcdd3664fc | 14 | pc.printf("El valor de x es: %d \r\n",x); |
rgsbuap | 26:17dcdd3664fc | 15 | x = x+1; |
stevep | 4:81cea7a352b0 | 16 | } |
rgsbuap | 26:17dcdd3664fc | 17 | |
dan | 0:7dec7e9ac085 | 18 | } |