GPS to Pulga
source/main.cpp
- Committer:
- pancotinho
- Date:
- 2020-10-23
- Revision:
- 25:ecdee9ef9939
- Parent:
- 24:595155aa83c3
- Child:
- 26:1e1776201716
File content as of revision 25:ecdee9ef9939:
/***GENERAL INCLUDES***/ //MBed Includes #include <events/mbed_events.h> #include <stdio.h> #include "mbed.h" //Global Variables int lat=0; int lon=0; int latitude=0; int longitude=0; DigitalOut led1(P1_13); //Includes #include "gps.txt" void GPS_Read(void) { gps_print_local(); printf ("gps longitude=%d \n",lon); printf ("gps latitude=%d \n",lat); if(lat!=0 && lon!=0){ longitude=lon; latitude=lat; led1 = !led1; } } int main() { gps_config(); gps_leBootMsg(); gps_config_gnss (); while (1){ GPS_Read(); wait (5); } }