for textbook v4.4

Dependencies:   HEPTA_SENSOR mbed HEPTA_EPS HEPTA_CDH

Revision:
26:2d7738ea9ee4
Parent:
25:5fd40a170032
--- a/main.cpp	Tue Aug 27 01:15:05 2019 +0000
+++ b/main.cpp	Tue Aug 27 01:26:14 2019 +0000
@@ -2,7 +2,6 @@
 #include "HEPTA_EPS.h"
 #include "HEPTA_CDH.h"
 #include "HEPTA_SENSOR.h"
-#include "HEPTA_COM.h"
 
 Serial pc(USBTX,USBRX);
 HEPTA_EPS eps(p16,p26);
@@ -10,14 +9,19 @@
 HEPTA_SENSOR sensor(p17, 
                     p28,p27,0xD0,0x18,
                     p13,p14,p25,p24);
-HEPTA_COM com(p9,p10);
-
-DigitalOut myled(LED1);
 
 int main()
 {
-    myled = 1;
-    wait(0.5);
-    myled = 0;
-    wait(0.5);
+    FILE *dummy = fopen("/sd/dummy.txt","w");
+    if(dummy == NULL) {
+        error("Could not open file for write\r\n");
+    }
+    fclose(dummy);
+    
+    pc.printf("Camera Snapshot Mode\r\n");
+    pc.printf("Hit Any Key To Take Picture\r\n");
+    while(!pc.readable()) {}
+    sensor.Sync();
+    sensor.initialize(HeptaCamera_GPS::Baud115200, HeptaCamera_GPS::JpegResolution320x240);
+    sensor.test_jpeg_snapshot_picture("/sd/test.jpg");
 }
\ No newline at end of file