A code to drive a 3sensor reading unit for monitoring the operation opf a closed circuit rebreather (CCR) with 3 electrogalvanic sensors. Also uses a DS1307 for realtime clock and an MPX5700 to read the depth (mounted inside the breathing loop to keep it 'dry'). circuit diagrams available on rebreather world.

Dependencies:   DS1307 TextOLED mbed

Revision:
8:f45e654b47d0
Parent:
7:f93b7eaab5f6
Child:
9:71b8ac65b73a
--- a/Rebmon_main.cpp	Mon Jan 14 12:52:45 2013 +0000
+++ b/Rebmon_main.cpp	Mon Jan 14 12:55:05 2013 +0000
@@ -755,6 +755,7 @@
             state=2; // enter dive mode
             lp=fopen("/local/divelog.dat","a");
             fprintf(lp,"#startdive = %d\n#seconds\tdepth\tppo1\tppo2\tppo3\tVb\t\tV5V\tscrubtime\n",seconds); // bung in a header here in case one needs it
+            store_log(); // make a first log entry to catch this erliest part of the dive
             if (startdive==0) startdive=seconds; // set start of divetime. don't do this twice
             endclock=0; // reset end of dive clock
         }