Code supports writing to the SD card as well as working with the Volckens group smartphone apps for the mbed HRM1017

Dependencies:   ADS1115 BLE_API BME280 Calibration CronoDot EEPROM LSM303 MCP40D17 NCP5623BMUTBG SDFileSystem SI1145 STC3100 mbed nRF51822

Fork of UPAS_BLE_and_USB by Volckens Group Sensors

Revisions of main.cpp

Revision Date Message Actions
89:047e8558fd09 2015-09-24 Changed program flow after opening admen menu to restart if any of the program flow settings have changed. Also opening the admen menu now counts as opening the menu in general. File  Diff  Annotate
88:9142f21a4715 2015-09-23 set the gain for between 1 and 2 lpm back to 25. File  Diff  Annotate
87:c920521283b2 2015-09-23 Changed demo mode to run at admin flow and datalogging settings. File  Diff  Annotate
86:60c9ec6e48ed 2015-09-23 Added check to make sure the start and stop times are valid when using programmable start or stop times. File  Diff  Annotate
85:a95dd5f03818 2015-09-18 A lot of stuff, see the onenote page.; File  Diff  Annotate
84:85d11d422da3 2015-09-16 Made some adjustments to the Honduras initialization to ensure the runready is set to 0 and saved once turned on the second time. Start time seems to be fixed now that there is content in the while loop. Stop time now isn't working.. File  Diff  Annotate
83:9153d6c3af81 2015-09-16 Demo and Honduras initialization seem to be working properly, but the UBCUO (wait till start time matches RTC time) initialization still has issues. Calibration values are also still an issue. File  Diff  Annotate
82:e01326a63ae9 2015-09-16 Made some minor adjustments to the demo mode loop and now when in UBCUO mode the UPAS doesn't shut down after exiting the menu. File  Diff  Annotate
81:480f0310ef9a 2015-09-15 Made the SD file name read in the serial number, and added in a printf loop to show the calibration values that are being used for debugging. File  Diff  Annotate
80:5487ba127c82 2015-09-15 New structures to support additional run modes, such as Demo mode that just runs the pumps and logs data from power on til you turn it off. File  Diff  Annotate
79:ed555e9081d0 2015-09-15 Added UPAS Demo mode to the admen menu options under consider run ready. File  Diff  Annotate
78:a465de6cc47e 2015-09-11 Minor modifications to accommodate the UBM's new admen menu and it's arguments. File  Diff  Annotate
77:24fbeb2bfe05 2015-09-04 Unified UPAS UBCO and Honduras code into one code that can be configured with the Admin menu. Admin menu is still USM exclusive. File  Diff  Annotate
76:8130cb6776c6 2015-09-01 Updated to uses the newest UBM, for real this time. File  Diff  Annotate
75:52e3d2280040 2015-09-01 Updated with the new Universal BLE Menu (UBM), and fixed a minor bug/nit when checking the RTC's OSF. File  Diff  Annotate
74:c574a6e04230 2015-08-30 Read EEPROM prior to BLE init to show first 8 characters of the 15 character sample name File  Diff  Annotate
73:47910ee23ebf 2015-08-30 Removed the duplicate UPAS-Hondduras_with_BLE that was in the program, changed to UPAS0012, and changed the file naming convention to place "_" between the date, time, and 15 character sample identifier. File  Diff  Annotate
72:0b36575ab00d 2015-08-20 Updated to uses the universal serial menu. File  Diff  Annotate
71:78edbceff4fc 2015-08-19 Modified UPAS Honduras code to allow time/date and name to be changed from either the USB serial menu or the BLE menu. The light will flash brighter and dimmer to indicate it's looking for a USB or BLE signal. File  Diff  Annotate
70:81f04e69e08a 2015-08-16 Fixed issues with logging time stamp variation. Logs at 10s intervals at 0,10,20,30,40,50 seconds. File  Diff  Annotate
69:7a99d97c334e 2015-08-15 Added in the Dec to January Rollover scenario File  Diff  Annotate
68:ca444d0760a0 2015-08-15 UPAS0011 version of the code. File  Diff  Annotate
67:300418575137 2015-08-15 Upon first powerup requires the menu to be brought up and time/date and sample name to be updated, once exit menu, powers down. Second power starts initialization and then runs for 24 hours or until powered down. File  Diff  Annotate
64:2906b0c48403 2015-07-08 Fixed extra " } ", should now compile. Nothing else. File  Diff  Annotate
63:66796aef8d68 2015-07-08 Commented out debug messages, shouldn't harm anything either way. File  Diff  Annotate
62:edc9632bcc43 2015-07-08 Converted control loop to callbacks, should prevent the i2c communication from being interrupted, and broken. Also added comments about how to disable and enable interrupts, also to prevent communications from being interrupted. File  Diff  Annotate
60:5913d77c8a4a 2015-07-06 UPAS code v2.0 - Changed menu interaction semantics and filename convention - otherwise nothing major - should be good to run with this. File  Diff  Annotate
59:a9b21b3d9afc 2015-07-02 Fixed start and stop issues, code should now start and stop at the correct time. Also now has option for duty cycle. ; Only known bug is the i2c communication bugging out after a shutdown, power cycle to fix. File  Diff  Annotate
58:7239c2ab2b65 2015-07-02 Added back in the stop time function which still doesn't work properly File  Diff  Annotate
57:0b554f7aa9a3 2015-07-01 Removed stop time requirement and fixed the issue with accidentally commenting out the start time while loop. File  Diff  Annotate
56:c4d6bdd7c3fb 2015-06-30 Set gas gauge to reset when the UPAS is turned on. File  Diff  Annotate
55:f24d70f519cd 2015-06-29 Updated RTC calls to reflect josh's changes to the library. Added in a hold for large changes in flow to permit the return to original digital pot setting to allow for recovery from temporary flow blockage. File  Diff  Annotate
54:8ee11c9ecd8a 2015-06-27 Updated UPAS12 TF File  Diff  Annotate
53:03d8d5b1f06b 2015-06-27 Updated UPAS12 TF File  Diff  Annotate
52:80480b2fafba 2015-06-18 v1.1 code for UBC/OSU UPASs. Includes flow control and integrated sample volume. Individual calibration coefficients in calibration spreadsheet and MS-Word doc. File  Diff  Annotate
51:91cfb90e901c 2015-06-16 Corrected serial stamp to UPAS0011 File  Diff  Annotate
50:dddf01867e85 2015-06-12 still contains RTCtime errors on lines 112 and 122 File  Diff  Annotate
49:19e828650618 2015-06-14 Made the Omron min and max voltage and flow rates a variable that can be set in one place. File  Diff  Annotate
48:b8cbef6aaed2 2015-06-14 Updated sd printout File  Diff  Annotate
47:3146e8c949a9 2015-06-13 added variable gain for 1 and 2 lpm flow rates. File  Diff  Annotate
46:af5f2d7c158c 2015-06-13 Updated flow control. Integrated led indication of operation mode as well. No filter load can be problematic, but a red light indicates this issue. We can kill the unit if appropriate flow can't be obtained. File  Diff  Annotate
45:1d06ac109d04 2015-06-12 modified line 224 SD card write to reflect the int to float change for the UV index. File  Diff  Annotate
44:096dcb50ff08 2015-06-12 Uses a gain of 100x the mass flow error. Seems to work well even with disturbance inputs. File  Diff  Annotate
43:da0708632a21 2015-06-12 try number two on the flow control code File  Diff  Annotate
42:fc2f2b9f07ae 2015-06-11 Attempt at flow control. Need to figure out a more fundamental base number. Perhaps use the deltaflow rate portion. File  Diff  Annotate
41:1fb3e0ac6f87 2015-06-09 Replaced wire.h library with CronoDot library. File  Diff  Annotate
40:ef7e1dcb3780 2015-06-09 Added the library to control the RGB LED and turned the LED on as low as possible green. File  Diff  Annotate
38:e02e037132b4 2015-06-05 updated fprintf precision for acc_x/y/z to 4 decimal places File  Diff  Annotate
37:838824df3f5f 2015-06-04 Operating code in UPASs shipped to UBC/OSU - includes all MFS transfer functions File  Diff  Annotate
36:2d90be7655e1 2015-06-03 Updated filenaming File  Diff  Annotate
35:bd978e6ccd82 2015-06-02 Removed wire.h library and replaced it with the CronoDot library. Also added the NCP5623BMUTBG library for control over RGB LEDs. File  Diff  Annotate
34:481403146690 2015-05-31 Simple control loop implemented. File  Diff  Annotate
33:bc73a2493821 2015-05-31 UPAS0005 with 31May calibration and updated log filenaming File  Diff  Annotate
32:72e9ea8368da 2015-05-31 UPAS0005 calibrated 31May2015 File  Diff  Annotate
31:f8504ef165fb 2015-05-31 File name formatting modification File  Diff  Annotate
30:8a33a94a1a89 2015-05-31 UPAS0004 operating code calibrated 31May2015 File  Diff  Annotate
29:29dcd5391c36 2015-05-31 Operating program for UPAS0003 31May2015 File  Diff  Annotate
28:39747a95e989 2015-05-31 Not sure what is updated here File  Diff  Annotate
27:6830122ebc00 2015-05-30 UPAS0002 Operational Code 2015 05 30 Calibration File  Diff  Annotate
26:9cf8e76d8274 2015-05-30 UPAS0002 Operational Code 2015 05 30 Calibration File  Diff  Annotate