Camera Ver3
Dependencies: mbed HeptaBattery SDFileSystem HeptaCamera_GPS
Fork of Lab7-01_template by
main.cpp@23:39e0b9856651, 2018-10-07 (annotated)
- Committer:
- HEPTA
- Date:
- Sun Oct 07 03:44:12 2018 +0000
- Revision:
- 23:39e0b9856651
- Parent:
- 21:ecb6fe92cd3a
- Child:
- 25:22253202c043
error????fopen?fclose???
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
mbed_official | 0:bdbd3d6fc5d5 | 2 | #include "SDFileSystem.h" |
umeume | 2:1c5cdb2c3e0f | 3 | #include "HeptaCamera_GPS.h" |
umeume | 2:1c5cdb2c3e0f | 4 | |
umeume | 2:1c5cdb2c3e0f | 5 | Serial pc(USBTX,USBRX); |
HEPTA | 9:942eb6e8c117 | 6 | SDFileSystem sd(p5, p6, p7, p8, "sd"); |
HEPTA | 14:52fe0357f8b2 | 7 | HeptaCamera_GPS cam_gps(p13, p14,p25,p24);//(tx,rx,camera switch,gps switch) |
umeume | 5:c5ccb1b07e8f | 8 | |
umeume | 2:1c5cdb2c3e0f | 9 | int main() |
umeume | 2:1c5cdb2c3e0f | 10 | { |
HEPTA | 23:39e0b9856651 | 11 | FILE *dummy = fopen("/sd/dummy.txt","w"); |
HEPTA | 23:39e0b9856651 | 12 | fclose(dummy); |
HEPTA | 23:39e0b9856651 | 13 | |
HEPTA | 14:52fe0357f8b2 | 14 | pc.printf("Camera Snapshot Mode\r\n"); |
HEPTA | 17:1c3433f46c17 | 15 | pc.printf("Hit Any Key To Take Picture\r\n"); |
HEPTA | 17:1c3433f46c17 | 16 | while(!pc.readable()) {} |
HEPTA | 14:52fe0357f8b2 | 17 | cam_gps.Sync(); |
HEPTA | 14:52fe0357f8b2 | 18 | cam_gps.initialize(HeptaCamera_GPS::Baud115200, HeptaCamera_GPS::JpegResolution320x240); |
HEPTA | 21:ecb6fe92cd3a | 19 | cam_gps.test_jpeg_snapshot_picture("/sd/test.jpg"); |
umeume | 2:1c5cdb2c3e0f | 20 | } |