Camera Ver3
Dependencies: mbed HeptaBattery SDFileSystem HeptaCamera_GPS
Fork of Lab7-01_template by
main.cpp@25:22253202c043, 2019-08-19 (annotated)
- Committer:
- HEPTA
- Date:
- Mon Aug 19 06:18:12 2019 +0000
- Revision:
- 25:22253202c043
- Parent:
- 23:39e0b9856651
- Child:
- 26:72b784d2bf6b
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" |
HEPTA | 25:22253202c043 | 4 | #include "HeptaBattery.h" |
umeume | 2:1c5cdb2c3e0f | 5 | |
umeume | 2:1c5cdb2c3e0f | 6 | Serial pc(USBTX,USBRX); |
HEPTA | 9:942eb6e8c117 | 7 | SDFileSystem sd(p5, p6, p7, p8, "sd"); |
HEPTA | 14:52fe0357f8b2 | 8 | HeptaCamera_GPS cam_gps(p13, p14,p25,p24);//(tx,rx,camera switch,gps switch) |
HEPTA | 25:22253202c043 | 9 | HeptaBattery battery(p19,p26); |
umeume | 5:c5ccb1b07e8f | 10 | |
umeume | 2:1c5cdb2c3e0f | 11 | int main() |
umeume | 2:1c5cdb2c3e0f | 12 | { |
HEPTA | 23:39e0b9856651 | 13 | FILE *dummy = fopen("/sd/dummy.txt","w"); |
HEPTA | 23:39e0b9856651 | 14 | fclose(dummy); |
HEPTA | 23:39e0b9856651 | 15 | |
HEPTA | 14:52fe0357f8b2 | 16 | pc.printf("Camera Snapshot Mode\r\n"); |
HEPTA | 17:1c3433f46c17 | 17 | pc.printf("Hit Any Key To Take Picture\r\n"); |
HEPTA | 17:1c3433f46c17 | 18 | while(!pc.readable()) {} |
HEPTA | 14:52fe0357f8b2 | 19 | cam_gps.Sync(); |
HEPTA | 14:52fe0357f8b2 | 20 | cam_gps.initialize(HeptaCamera_GPS::Baud115200, HeptaCamera_GPS::JpegResolution320x240); |
HEPTA | 21:ecb6fe92cd3a | 21 | cam_gps.test_jpeg_snapshot_picture("/sd/test.jpg"); |
umeume | 2:1c5cdb2c3e0f | 22 | } |