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@0:f04f6d613205, 2011-09-21 (annotated)
- Committer:
- axm904
- Date:
- Wed Sep 21 14:34:24 2011 +0000
- Revision:
- 0:f04f6d613205
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| axm904 | 0:f04f6d613205 | 1 | #include "mbed.h" |
| axm904 | 0:f04f6d613205 | 2 | Serial pc(USBTX, USBRX); |
| axm904 | 0:f04f6d613205 | 3 | Serial erad(p9, p10); |
| axm904 | 0:f04f6d613205 | 4 | char tex; |
| axm904 | 0:f04f6d613205 | 5 | int stat=0; |
| axm904 | 0:f04f6d613205 | 6 | int main() { |
| axm904 | 0:f04f6d613205 | 7 | erad.baud(19200); |
| axm904 | 0:f04f6d613205 | 8 | while(1) { |
| axm904 | 0:f04f6d613205 | 9 | stat=erad.readable(); |
| axm904 | 0:f04f6d613205 | 10 | if(stat>0){ |
| axm904 | 0:f04f6d613205 | 11 | erad.scanf("%s",&tex); |
| axm904 | 0:f04f6d613205 | 12 | pc.printf("%s",tex); |
| axm904 | 0:f04f6d613205 | 13 | } |
| axm904 | 0:f04f6d613205 | 14 | } |
| axm904 | 0:f04f6d613205 | 15 | } |