GPS to Pulga
source/main.cpp
- Committer:
- brunnobbco
- Date:
- 2020-12-11
- Revision:
- 26:1e1776201716
- Parent:
- 25:ecdee9ef9939
File content as of revision 26:1e1776201716:
/***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); DigitalOut led2(P1_14); //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() { led2=0; gps_config(); gps_leBootMsg(); gps_config_gnss (); while (1){ GPS_Read(); wait (5); } }