test

Dependencies:   CameraC1098 FatFileSystem HeptaGPS SDHC_Lib mbed

Fork of CameraC1098_picture by Tadao Iida

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "SDHCFileSystem.h"
00003 #include "CameraC1098.h"
00004 #include "HeptaGPS.h"
00005 Serial pc(USBTX, USBRX); // tx, rx
00006 SDFileSystem sd(p5, p6, p7, p8, "fs");
00007 //HeptaGPS gps(p13,p14);
00008 CameraC1098 camera(p13, p14, CameraC1098::Baud115200);//Baud消したい①
00009 HeptaGPS gps(p13,p14);
00010 DigitalOut CAM_SW(p25);//CAM_control
00011 DigitalOut GPS_SW(p24);//GPS_control
00012 char mode;
00013 int main()
00014 {
00015     pc.baud(115200);
00016     pc.printf("mode select\r\n");
00017     while(1) {
00018         mode = pc.getc();
00019         if(mode == 'c') {
00020             pc.printf("%c\r\n",mode);
00021             CAM_SW=1;
00022             GPS_SW=0;
00023             camera.Sync();
00024             camera.jpeg_snapshot(1);
00025             pc.printf("Finish\r\n");
00026         } else if(mode == 'g') {
00027             pc.printf("%c\r\n",mode);
00028             CAM_SW=0;
00029             GPS_SW=1;
00030             gps.baud(9600);
00031            while(1) pc.putc(gps.getc());
00032         }
00033 
00034     }
00035 }