Camera Ver3

Dependencies:   mbed HeptaBattery SDFileSystem HeptaCamera_GPS

Fork of Lab7-01_template by HEPTA-Sat Training 2017~2018

main.cpp

Committer:
HEPTA
Date:
2019-08-19
Revision:
26:72b784d2bf6b
Parent:
25:22253202c043

File content as of revision 26:72b784d2bf6b:

#include "mbed.h"
#include "SDFileSystem.h"
#include "HeptaCamera_GPS.h"
#include "HeptaBattery.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()
{
    FILE *dummy = fopen("/sd/dummy.txt","w");
    fclose(dummy);
    
    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_picture("/sd/test.jpg");
}