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
Diff: main.cpp
- Revision:
- 53:03d8d5b1f06b
- Parent:
- 49:19e828650618
--- a/main.cpp Sun Jun 14 18:05:08 2015 +0000 +++ b/main.cpp Sat Jun 27 17:59:01 2015 +0000 @@ -49,17 +49,21 @@ int omronReading; float omronVolt; //V -float omronVMin = 0.7; //V -float omronVMax = 2.3; //V -float omronMFMin = 0.2209; //g/L -float omronMFMax = 3.548944; //g/L +float omronVMin = 0.435; //V +float omronVMax = 1.7997; //V +float omronMFMin = 0.013; //g/L +float omronMFMax = 2.669; //g/L + + float atmoRho; //g/L -float MF0 = -8.794; -float MF1 = 27.914; -float MF2 = -30.738; -float MF3 = 15.031; -float MF4 = -2.5778; +float MF4 = -0.9507; +float MF3 = 5.1495; +float MF2 = -9.2983; +float MF1 = 8.3236; +float MF0 = -2.2377; + + float massflow; //g/min float volflow; //L/min float volflowSet = 1.0; //L/min @@ -70,11 +74,13 @@ uint8_t digital_pot_setpoint; //min = 0x7F, max = 0x00 uint8_t digital_pot_set; -float DP0 = 376.73; -float DP1 = -512.82; -float DP2 = 303.77; -float DP3 = -85.942; -float DP4 = 9.2763; +float DP4 = 6.0986; +float DP3 = -55.372; +float DP2 = 192.76; +float DP1 = -326.6; +float DP0 = 244.32; + + char filename[] = "/sd/UPAS0010LOG000000000000.txt"; SDFileSystem sd(SPIS_PSELMOSI, SPIS_PSELMISO, SPIS_PSELSCK, SPIS_PSELSS, "sd"); // I believe this matches Todd's pinout, let me know if this doesn't work. (p12, p13, p15, p14)