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
113:846f67efaa80 2016-02-17 commented out callback functions (replaced by while loop and wait statements in main()). Also added purple light to indicate waiting to start. File  Diff  Annotate
112:fd14d51e3493 2016-02-17 Log Data loop placed into main to avoid timeout issues File  Diff  Annotate
111:5f2ba5f1a468 2016-02-12 ticker craps out after ~72 minutes. Reverted to last version of code that uses the Timeout function. There will be some logg drift but I think it should continuous logg fairly regularly. File  Diff  Annotate
110:67980ebdebf6 2016-02-12 Replaced logg interupt using Timeout with Ticker function. File  Diff  Annotate
109:33d7fc6c1b9b 2016-02-12 serial number fixed File  Diff  Annotate
108:2cf8d5159fc6 2016-02-11 removed fmod loop in the log loop to try and eliminate the log loop crash issue. this however will likely cause inconsistent log points such as 10 sec, 11 sec, 10 sec, 11 sec, etc File  Diff  Annotate
107:5e3364e42214 2016-02-11 serial number hack fix requires a .hex file for every upas. currently has the latest calibration coefficients. File  Diff  Annotate
106:3911b3c7a24e 2016-02-10 Hard coded calibration value for temp fix File  Diff  Annotate
105:f3be9e0314f7 2016-01-22 Updated the log function to the latest control loop added onto Jake's latest version of the app code File  Diff  Annotate
104:c57913399e79 2016-01-22 Code updated to allow change of serial number / display serial number to app at scan. Still needs to be merged with previous commit File  Diff  Annotate
103:a2d7d946d69c 2016-01-20 Updated the datalog function to match the code in UPAS_USB_Updated File  Diff  Annotate
102:d25eab697fe0 2016-01-15 Serial Number & sample name fixed. No memory issues in this commit... blocks of code commented out File  Diff  Annotate
101:0c3f33f14f4f 2016-01-13 Small changes for broadcasting "running" characterisitic File  Diff  Annotate
100:da71436aa52a 2016-01-12 24-Hour Mode added File  Diff  Annotate
99:229435dd4cfb 2016-01-11 Name of multiple UPAS can now be distinguished by app File  Diff  Annotate
98:d70ff5a0b2e6 2016-01-09 Flow Rate adjustment on app is now used by UPAS File  Diff  Annotate
97:c596f8ed4562 2015-12-17 log interval is now settable/usable from iphone app File  Diff  Annotate
96:03106adb45c9 2015-12-17 Changes to Readability of BLE characterisitics File  Diff  Annotate
95:0ae0ffddc544 2015-12-11 Small fix to code so app see correct previous start and end time... forking File  Diff  Annotate
94:c57720890e76 2015-12-10 Works with new App and can write to the SD card File  Diff  Annotate
93:b53a9a7cb8f1 2015-10-09 Made adjustments to improve the logging intervals to be consistent for 10 and 1 second logging with out drift or multiple logging events per second. File  Diff  Annotate
92:bb36c4bedb8e 2015-10-06 I2C bus crashing and the device not shutting down should now be fixed. The device may not log exactly every 10s but it's very very very close. File  Diff  Annotate
91:f838d9a5b596 2015-09-29 Fixed 24hr test conditions, also commented out RTC OSF checks until we figure out why the RTC is losing power when turned off. File  Diff  Annotate
90:26a08de1a0ac 2015-09-24 Updated the USM library to open the normal menu when you close the admen menu.; ; File  Diff  Annotate
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