added spectrometer timeout
Dependencies: SDFileSystem mbed
Fork of All_Combined_Real2 by
Revision 13:346b43aa06c0, committed 2016-04-13
- Comitter:
- jphbergeson
- Date:
- Wed Apr 13 23:53:47 2016 +0000
- Parent:
- 12:2df303e4aee2
- Commit message:
- Added some logging, plus a variable to keep track of the value of the LED
Changed in this revision
SDFileSystem.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SDFileSystem.lib Tue Apr 12 18:13:57 2016 +0000 +++ b/SDFileSystem.lib Wed Apr 13 23:53:47 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/neilt6/code/SDFileSystem/#3fa5eaf48e81 +http://mbed.org/users/neilt6/code/SDFileSystem/#6bb3c1987511
--- a/main.cpp Tue Apr 12 18:13:57 2016 +0000 +++ b/main.cpp Wed Apr 13 23:53:47 2016 +0000 @@ -54,6 +54,7 @@ // Blinking red LED DigitalOut led(LED_RED); +int led_val = 0; // GPS connection (through arduino) Serial duino(PTC4, PTC3); @@ -133,6 +134,9 @@ int main() { + led = 1; + led_val = 1; + // turn on light source & spectrometer, start with cooling unit off lightsource_ssr = 1; spectrometer_ssr = 1; @@ -158,9 +162,12 @@ while (true) { - - led = !led; - + pc.printf("beginning again\r\n"); + + // have to have this extra value b/c it sometimes has problems reading from DigitalOut + led = !led_val; + led_val = !led_val; + pc.printf("about to gps_read\r\n"); gps_read(); check_temp(); // Display result @@ -175,6 +182,7 @@ trigger = 0; read_pixels(); + pc.printf("%lf\r\n", tempCelsiusDouble); if (tempCelsiusDouble > OVERHEATING_TEMP) { // Turn off the bulbs and the shutter halogen_ttl = 0; @@ -197,7 +205,8 @@ } else { // turn off cooling cooling_ssr = 0; - } + } + pc.printf("end of cooling\r\n"); wait(0.5f); }