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.
Dependencies: mbed
main.cpp@0:e60e508d0cd9, 2021-07-08 (annotated)
- Committer:
- kinii
- Date:
- Thu Jul 08 19:27:20 2021 +0000
- Revision:
- 0:e60e508d0cd9
simple passthru example
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| kinii | 0:e60e508d0cd9 | 1 | #include "mbed.h" |
| kinii | 0:e60e508d0cd9 | 2 | |
| kinii | 0:e60e508d0cd9 | 3 | Serial pc(USBTX, USBRX); |
| kinii | 0:e60e508d0cd9 | 4 | Serial wifi(p9, p10); |
| kinii | 0:e60e508d0cd9 | 5 | |
| kinii | 0:e60e508d0cd9 | 6 | int main() { |
| kinii | 0:e60e508d0cd9 | 7 | while(1) { |
| kinii | 0:e60e508d0cd9 | 8 | if(pc.readable()) |
| kinii | 0:e60e508d0cd9 | 9 | wifi.putc(pc.getc()); |
| kinii | 0:e60e508d0cd9 | 10 | if(wifi.readable()) |
| kinii | 0:e60e508d0cd9 | 11 | pc.putc(wifi.getc()); |
| kinii | 0:e60e508d0cd9 | 12 | } |
| kinii | 0:e60e508d0cd9 | 13 | } |