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 4:3f1a2b5dc176, committed 2011-04-18
- Comitter:
- sgrove
- Date:
- Mon Apr 18 04:16:13 2011 +0000
- Parent:
- 3:987ee333d593
- Commit message:
- r3
Changed in this revision
| main.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 987ee333d593 -r 3f1a2b5dc176 main.h
--- a/main.h Mon Apr 18 04:14:57 2011 +0000
+++ b/main.h Mon Apr 18 04:16:13 2011 +0000
@@ -1,38 +1,50 @@
-/** Servo control class, based on a PwmOut
+/** @defgroup API The MODGPS API */
+
+/** GPS module
+ * @author Andy Kirkham
+ * @see http://mbed.org/cookbook/MODGPS
+ * @see example1.cpp
+ * @see example2.cpp
+ * @see API
+ *
+ * @image html /media/uploads/AjK/gps_interfaces.png "Wiring up the GPS module"
*
* Example:
* @code
- * // Continuously sweep the servo through it's full range
* #include "mbed.h"
- * #include "Servo.h"
- *
- * Servo myservo(p21);
- *
+ * #include "GPS.h"
+ *
+ * DigitalOut led1(LED1);
+ * Serial pc(USBTX, USBRX);
+ * GPS gps(NC, p10);
+ *
* int main() {
- * while(1) {
- * for(int i=0; i<100; i++) {
- * myservo = i/100.0;
- * wait(0.01);
- * }
- * for(int i=100; i>0; i--) {
- * myservo = i/100.0;
- * wait(0.01);
- * }
+ * GPS_Time t;
+ *
+ * // Wait for the GPS NMEA data to become valid.
+ * while (!gps.isTimeValid()) {
+ * led1 = !led1;
+ * wait(1);
* }
+ *
+ * gps.timeNow(&t);
+ *
+ * pc.printf("The time/date is %02d:%02d:%02d %02d/%02d/%04d\r\n",
+ * t.hour, t.minute, t.second, t.day, t.month, t.year);
+ *
+ * // Wait until at least four satellites produce a position fix and a valid quality.
+ * while (gps.numOfSats() < 4 && gps.getGPSquality != 0) {
+ * led1 = !led1;
+ * wait(1);
+ * }
+ *
+ * pc.printf("Lat = %.4f Lon = %.4f Alt = %.1fkm\r\n",
+ * gps.latitude(), gps.longitude, gps.altitude());
+ *
+ * // Make the LED go steady to indicate we have finished.
+ * led1 = 1;
+ *
+ * while(1) {}
* }
* @endcode
- */
-/** Create a servo object connected to the specified PwmOut pin
- *
- * @param pin PwmOut pin to connect to
- */
-
- /** A brief description of the function foo
- *
- * More details about the function goes here
- * and here
- *
- * @param x a variable used by foo
- * @returns something magical done with x
- */
-int foo(int x) {...}
\ No newline at end of file
+ */
\ No newline at end of file