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.
Fork of Lab7-01_template by
main.cpp@11:dbb3dde00a9f, 2017-09-06 (annotated)
- Committer:
- HEPTA
- Date:
- Wed Sep 06 22:57:33 2017 +0000
- Revision:
- 11:dbb3dde00a9f
- Parent:
- 10:a998300647dd
LAB_1
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
| umeume | 2:1c5cdb2c3e0f | 2 | |
| umeume | 2:1c5cdb2c3e0f | 3 | Serial pc(USBTX,USBRX); |
| umeume | 5:c5ccb1b07e8f | 4 | |
| umeume | 2:1c5cdb2c3e0f | 5 | int main() |
| umeume | 2:1c5cdb2c3e0f | 6 | { |
| HEPTA | 11:dbb3dde00a9f | 7 | |
| HEPTA | 10:a998300647dd | 8 | pc.baud(9600); |
| HEPTA | 10:a998300647dd | 9 | int i1 = 7; |
| HEPTA | 10:a998300647dd | 10 | float i2 = 7.5; |
| HEPTA | 10:a998300647dd | 11 | char i3 = 'H'; |
| HEPTA | 10:a998300647dd | 12 | pc.printf("Hello World!\r\n"); |
| HEPTA | 10:a998300647dd | 13 | pc.printf("i1 = %d\r\n",i1); |
| HEPTA | 10:a998300647dd | 14 | pc.printf("i2 = %f\r\n",i2); |
| HEPTA | 10:a998300647dd | 15 | pc.printf("i3 = %c\r\n",i3); |
| HEPTA | 10:a998300647dd | 16 | pc.putc(i3); |
| HEPTA | 11:dbb3dde00a9f | 17 | |
| HEPTA | 10:a998300647dd | 18 | for(i1 = 0; i1 < 10; i1++) { |
| HEPTA | 10:a998300647dd | 19 | pc.printf("i1 = %d\r\n",i1); |
| HEPTA | 10:a998300647dd | 20 | pc.putc(pc.getc()); |
| HEPTA | 10:a998300647dd | 21 | } |
| HEPTA | 11:dbb3dde00a9f | 22 | |
| umeume | 2:1c5cdb2c3e0f | 23 | } |
