attempt to fix posible power issues with the sharp

Dependencies:   ADS1115 BME280 CronoDot SDFileSystem mbed

Fork of Outdoor_UPAS_v1_2_Tboard by scott kelleher

Revisions of main.cpp

Revision Date Message Actions
60:e434c8c85020 2016-05-24 different version to attempt to solve sharp issues File  Diff  Annotate
59:4221935a12d8 2016-05-24 latest version File  Diff  Annotate
58:3233c10a668c 2016-05-22 only change is temperature correction File  Diff  Annotate
57:1695e252298d 2016-05-20 first cut of 4x sharp sensors on nucleo L152 File  Diff  Annotate
56:49387b72460e 2016-05-20 First publish for outdoor UPAS fork File  Diff  Annotate
55:2fb27f1ddff5 2016-05-16 Removed the green LED when batteries are fully charged. File  Diff  Annotate
54:a6073442bcef 2016-05-15 fixed the eternal loop after data transfer File  Diff  Annotate
53:5b4991d93cb1 2016-05-15 fixed string length issue for file transfer.; File  Diff  Annotate
52:95949e34b1f6 2016-05-15 Updated the filename(shorted and now uses ST RTC for timestamp). Also implemented file transfer of the newest file on the sd card, transfers that file, makes a copy in folder "c" and removes the original copy. File  Diff  Annotate
51:feba3e2aa1a0 2016-05-14 added gps utc date/time to the file name. File  Diff  Annotate
50:5f1b378e4f64 2016-05-08 Removed the duplicate sampledVol calculation from the flowcontrol callback to ensure no double counting of flow. Also made flowcontrol only available when the pumps are on. File  Diff  Annotate
49:055231b09a7e 2016-05-05 fixed issue with byte 0xff messing up gps coordinates being saved File  Diff  Annotate
48:45d29f874b23 2016-05-07 Only run flow control if pumps are on. This will hopefully eliminate the issue of getting stuck out of flow and running full power..... File  Diff  Annotate
47:fe50d72c7adc 2016-05-05 removed sampledVol calc from flow control as it was double adding the sampledVol. File  Diff  Annotate
46:99d129bfdbbd 2016-05-04 crude duty cycle that uses the percent as a fraction of 60 seconds so 50% dutycycle = 30s On, 30s Off. 75% = 45s On, 15s Off. Works well with dutycycles divisible by 5. File  Diff  Annotate
45:5e0942088e31 2016-05-03 Minor changes and fork to UBC code File  Diff  Annotate
44:075fa63d5df1 2016-05-03 cartridge ID added into the file name and set by the android app only at this moment. File  Diff  Annotate
43:05aa1fb68946 2016-05-03 no longer uses start/stop with RTC.compare and now uses a function in .cpp file that compares to STRTC instead. File  Diff  Annotate
42:c8ed2dc04dfe 2016-05-03 Fixed ST RTC logging issue. This is now the dedicated UBC UPAS code to work with android app for now. File  Diff  Annotate
41:737f967d707c 2016-05-03 Fixed ST datetime logging issue. File  Diff  Annotate
40:cac5bdffba44 2016-05-03 increased sample name to 15 characters for android app. need to update ios app as well to continue making both apps compatible? File  Diff  Annotate
39:f1ebecfb32ca 2016-05-03 sample name to 15, bt file transfer code File  Diff  Annotate
38:65ae9771f1e3 2016-04-29 now has code for bt duty cycle and cartridge id setting File  Diff  Annotate
37:6c2dca195871 2016-04-29 update to location code to try to keep valves from opening/closing every 5 seconds. File  Diff  Annotate
36:2e344db70d35 2016-04-29 Rivendell 20160502 code File  Diff  Annotate
35:e0bdd6389a75 2016-04-27 Flow control added back in and MS0001 and MS0003 calibrated. File  Diff  Annotate
34:da333abe3476 2016-04-27 changed adc gain for omron to 1 from 2 so range is now 4.096V File  Diff  Annotate
33:03d0e7f5ef0a 2016-04-25 Support for Second Home Micro.; Termination byte added to end of transmission to app File  Diff  Annotate
32:f400684a2950 2016-04-22 Send and receive serial number File  Diff  Annotate
31:aea6bfaefa0f 2016-04-22 TerminateByte added to send signal File  Diff  Annotate
30:aa6324845a84 2016-04-25 Changed the requirement for setting the serial number via sample name. Now requires a two digit number followed by a ~. ex 01~ will set the sampler name to MS0001. File  Diff  Annotate
29:fd74725294d5 2016-04-24 sets the serial # using the sample id string. If a 2 digit sample id is set then that value will be used for the serial number. If sample name > 2 will use existing. samplers 1-17 will have MS and >17 will be PS. SD file will use designation too File  Diff  Annotate
28:42932d3b105d 2016-04-23 Added hbridge code for Tboard RevC boards and probably some other stuff too. File  Diff  Annotate
27:922f53fa649c 2016-04-21 Fixed distance calculations to determine if at home or work/school. This version doesn't have the pumps turning on, and no flow control. File  Diff  Annotate
26:6aa294d83af4 2016-04-20 Pulls EEPROM lat/lon data for 2 microenvironments and sets them to global variables available for algorithm logic. File  Diff  Annotate
25:fbf7d44e7da4 2016-04-20 Added in microenvironment gps setting for 2 locations settable by the updated app. Battery near dead or after 8 pm red led blink to remind to plug in. Turn pumps off if the 3.3 rail drops out, turn back on once plugged in. Primarily for FOCO school File  Diff  Annotate
24:e274a34492cf 2016-04-07 Commented out Hbridge code from now until Tboard fix is completed. File  Diff  Annotate
23:1ca41779b8ec 2016-03-28 Tests Hbridges top two HB2 and HB4 are working. Added in gps heading and also red light for log when no gps connection and RGB light when gps connection.; UPASv1_Tboard_NUCLEO_L152RE_Hbridge_test_RN4677_GPS_pumpson_100digpot_20160327.bin File  Diff  Annotate
22:baa5a077d908 2016-03-26 Last publish was writing a new file every log instead of append. UPASv1_Tboard_NUCLEO_L152RE_BLERN4677_GPS_noHbridges_pumpson_20160325.bin File  Diff  Annotate
21:bb10efc5bf57 2016-03-26 BLE iOS programmable with GPS working. Hbridges only H4 is working? UPASv1_Tboard_NUCLEO_L152RE_BLERN4677_GPS_noHbridges_pumpson_20160325 File  Diff  Annotate
20:30a00cd18e21 2016-03-24 Few lines of code added at top of main for testing the EEPROM. Turns pumps on if EEPROM is NOT working File  Diff  Annotate
19:b835bfb61e35 2016-03-24 RN4677 on, gps off, sd logging file: UPASv1_2_Tboard_NUCLEO_L152RE_barebones_i2c_sdlog_rn4677_manualtimeset_pumpsonat100digpot_20160324.bin File  Diff  Annotate
18:41ef98db0423 2016-03-22 GPS, RN4677 programming, and pumps set to run without flow control at digitalpot setting of 100. UPASv1_2_Tboard_NUCLEO_L152RE_barebones_i2c_sdlog_gps_rn4677_manualtimeset_pumpsonat100digpot_20160322.bin File  Diff  Annotate
17:3e6dda6e6335 2016-03-22 GPS off, RN4677 on (works with iPhone only currently). Pumps are turned off. File UPASv1_2_Tboard_NUCLEO_L152RE_barebones_i2c_sdlog_rn4677_manualtimeset_nopump_20160322.bin File  Diff  Annotate
16:577cb22cec99 2016-03-22 added in gps File  Diff  Annotate
15:e564c8031c47 2016-03-22 actually set the time, added \r\n to make new lines in the txt file, changed LED scheme, and logging interval to 5 secs. This is the code for UPASv1_2_Tboard_NUCLEO_L152RE_barebones_i2c_sdlog_manualtimeset_20160322.bin File  Diff  Annotate
14:7cdb643da356 2016-03-22 Basic UPASv1 functionality with manual time set using the STM32 RTC and not the chronodot. No flow control but logging all UPASv1 data. UPASv1_Tboard_NUCLEO_L152RE_barebones_i2c_sdlog_manualtimeset_20160322.txt File  Diff  Annotate
13:455601f62aad 2016-03-22 Basic code for initial flashing of the Tboards. Code is also saved as a text file: UPASv1_Tboard_NUCLEO_L152RE_barebones_noi2c_20160321.txt. File  Diff  Annotate
12:5b4f3245606a 2016-03-21 Basic Tboard functionality. No i2c activated. File  Diff  Annotate
11:aa21628a9b15 2016-03-03 Reverted back to official mbed library due to Tboard trace changes to leave Serial2 for the USB com and to use Serial3 RX,TX,CTS,RTS for the RN4677. This works with the nucleo module. File  Diff  Annotate
10:06fbb1c9e3bd 2016-03-02 Updated mbed files and nucleo board to "try" and make the tboard RN4677 work on D1 and D0 rather than D8 and D2 pins. Still not working exactly right... File  Diff  Annotate
9:8646fd501832 2016-03-02 General code cleaning and also added in the chronodot RTC into the log file for now. File  Diff  Annotate
8:c4a8f9b67cee 2016-03-02 Separated the flow control code from the log code such that the flow control can now be checked at the same interval all the time regardless of the logging interval. File  Diff  Annotate
7:29b01d5812ee 2016-03-01 ST RTC now being set (most of the time) with the app. Also callback for the log_data are now working (needed a while(1){} in the main loop for the interrupts to continue working. Need to check that the stop interrupt is working. File  Diff  Annotate
6:a738dcd53bf8 2016-03-01 Recopied and updated the mbed folder version (now seems to work)... must not have been completely copied over... File  Diff  Annotate
5:c3252e5d45ca 2016-02-29 Changed RN4677 pins to D8 and D2 to match what Jake had previously and try to troubleshoot app issues first, then will need to address the potential pin conflict from nucleo pinout and the tboard pinout assignments. File  Diff  Annotate
4:5d004fd997d5 2016-02-26 Initial UPAS Tboard code. Currently has i2c, STRTC, and SDcard all working. Still need to figure out/add in RN4677, Ublox GPS, and hbridges File  Diff  Annotate
3:122bfc998c4c 2016-02-08 MicroBLE App mirrors same func. as UPAS_BLE_SD_iOS with this commit. Callbacks do not work properly/consistently File  Diff  Annotate
2:88fcbfadec6a 2016-02-03 App can now read/write to sample name, log interval, flow rate, and start/stop time. Still missing RTC File  Diff  Annotate
1:9fbb5b665068 2016-01-28 Reliably sending and receiving bytes from my own app... no distinction between messages here File  Diff  Annotate