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.
Dependencies: mbed HeptaBattery SDFileSystem HeptaCamera_GPS
main.cpp
- Committer:
- HEPTA
- Date:
- 2019-08-19
- Revision:
- 18:f7f05957c268
- Parent:
- 16:beb20346067a
File content as of revision 18:f7f05957c268:
#include "mbed.h"
#include "HeptaBattery.h"
#include "SDFileSystem.h"
#include "HeptaCamera_GPS.h"
Serial pc(USBTX,USBRX);
SDFileSystem sd(p5, p6, p7, p8, "sd");
HeptaCamera_GPS cam_gps(p13, p14,p25,p24);//(tx,rx,camera switch,gps switch)
HeptaBattery battery(p16,p26);
int main()
{
pc.baud(9600);
cam_gps.gps_setting();
int quality=0,stnum=0,gps_check=0;
char ns='A',ew='B',aunit='m';
float time=0.0,latitude=0.0,longitude=0.0,hacu=0.0,altitude=0.0;
for(int i=1; i<10; i++) {
cam_gps.gga_sensing(&time, &latitude, &ns, &longitude, &ew, &quality, &stnum, &hacu, &altitude, &aunit, &gps_check);
if((gps_check==0)|(gps_check==1)) {
pc.printf("GPGGA,%f,%f,%c,%f,%c,%d,%d,%f,%f,%c\r\n",time,latitude,ns,longitude,ew,quality,stnum,hacu,altitude,aunit);
}
}
}