It consists of 3 serial ports, one for GPS, second for GSM and third for viewing what is going on. GPS longitude, latitude, north-south, east-west are extracted and send as an SMS to the number saved in the program and displayed on LCD. SMS is also retrieved and deleted
Dependencies: Bus_Navigation GPS_HelloWorld TextLCD mbed
Fork of GPS_HelloWorld by
main.cpp@0:6b7345059afe, 2010-06-08 (annotated)
- Committer:
- simon
- Date:
- Tue Jun 08 14:12:30 2010 +0000
- Revision:
- 0:6b7345059afe
- Child:
- 1:ba73ffc5805f
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 0:6b7345059afe | 1 | #include "mbed.h" |
simon | 0:6b7345059afe | 2 | #include "GPS.h" |
simon | 0:6b7345059afe | 3 | |
simon | 0:6b7345059afe | 4 | Serial pc(USBTX, USBRX); |
simon | 0:6b7345059afe | 5 | GPS gps(p9, p10); |
simon | 0:6b7345059afe | 6 | |
simon | 0:6b7345059afe | 7 | int main() { |
simon | 0:6b7345059afe | 8 | while(1) { |
simon | 0:6b7345059afe | 9 | if(gps.sample()) { |
simon | 0:6b7345059afe | 10 | pc.printf("I'm at %f, %f\n", gps.longitude, gps.latitude); |
simon | 0:6b7345059afe | 11 | } else { |
simon | 0:6b7345059afe | 12 | pc.printf("Oh Dear! No lock :(\n"); |
simon | 0:6b7345059afe | 13 | } |
simon | 0:6b7345059afe | 14 | } |
simon | 0:6b7345059afe | 15 | } |