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:38958ff5de62, 2014-06-24 (annotated)
- Committer:
- ethanharstad
- Date:
- Tue Jun 24 04:47:14 2014 +0000
- Revision:
- 0:38958ff5de62
Initial commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ethanharstad | 0:38958ff5de62 | 1 | #include "mbed.h" |
| ethanharstad | 0:38958ff5de62 | 2 | #include "Venus838.h" |
| ethanharstad | 0:38958ff5de62 | 3 | |
| ethanharstad | 0:38958ff5de62 | 4 | Serial pc(USBTX, USBRX); |
| ethanharstad | 0:38958ff5de62 | 5 | Venus838 gps(PA_11, PA_12); |
| ethanharstad | 0:38958ff5de62 | 6 | |
| ethanharstad | 0:38958ff5de62 | 7 | int main() { |
| ethanharstad | 0:38958ff5de62 | 8 | pc.baud(115200); |
| ethanharstad | 0:38958ff5de62 | 9 | gps.setNavigationMode(4); |
| ethanharstad | 0:38958ff5de62 | 10 | wait_ms(100); |
| ethanharstad | 0:38958ff5de62 | 11 | gps.setUpdateRate(10); |
| ethanharstad | 0:38958ff5de62 | 12 | wait_ms(100); |
| ethanharstad | 0:38958ff5de62 | 13 | gps.setNmeaMessages(true, false, false, false, true, false); |
| ethanharstad | 0:38958ff5de62 | 14 | while(true) { |
| ethanharstad | 0:38958ff5de62 | 15 | if(gps.readable()) pc.putc(gps.getc()); |
| ethanharstad | 0:38958ff5de62 | 16 | if(pc.readable()) gps.putc(pc.getc()); |
| ethanharstad | 0:38958ff5de62 | 17 | } |
| ethanharstad | 0:38958ff5de62 | 18 | } |