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 Hepta9axis HeptaTemp HeptaXbee
main.cpp
- Committer:
- HEPTA
- Date:
- 2018-08-25
- Revision:
- 19:6b1498bd5e19
- Parent:
- 18:0f270fef8476
File content as of revision 19:6b1498bd5e19:
#include "mbed.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)
int main()
{
pc.printf("Camera Snapshot Mode\r\n");
pc.printf("Hit Any Key To Take Picture\r\n");
while(!pc.readable()) {}
cam_gps.Sync();
cam_gps.initialize(HeptaCamera_GPS::Baud115200, HeptaCamera_GPS::JpegResolution320x240);
cam_gps.test_jpeg_snapshot_data("/sd/test.txt");
FILE *fp = fopen("/sd/test.txt", "r");
if(fp == NULL) {
pc.printf("Could not open file for write\r\n");
} else {
char str[1024];
while((fgets(str,256,fp))!=NULL) {
pc.printf("%s",str);
//xbee.printf("%s",str);
wait(0.001);
}
pc.printf("Data transmitting finished\r\n");
fclose(fp);
}
}