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.
Revision 25:20950e7631e4, committed 2019-08-21
- Comitter:
- HeptaSatTraining2019
- Date:
- Wed Aug 21 12:43:48 2019 +0000
- Parent:
- 24:32c8f1508800
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 32c8f1508800 -r 20950e7631e4 main.cpp --- a/main.cpp Wed Aug 21 12:35:13 2019 +0000 +++ b/main.cpp Wed Aug 21 12:43:48 2019 +0000 @@ -1,23 +1,13 @@ #include "mbed.h" Serial pc(USBTX,USBRX); - -int main() -{ +Serial sig(p13,p14); - pc.baud(9600); - int i1 = 7; - float i2 = 7.5; - char i3 = 'H'; - pc.printf("Hello World!\r\n"); - pc.printf("i1 = %d\r\n",i1); - pc.printf("i2 = %f\r\n",i2); - pc.printf("i3 = %c\r\n",i3); - pc.putc(i3); - - for(i1 = 0; i1 < 10; i1++) { - pc.printf("i1 = %d\r\n",i1); - pc.putc(pc.getc()); +int main() { + char c; + while(1) { + c = pc.getc(); + pc.putc(c); + sig.putc(c); } - } \ No newline at end of file