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:
- 6:2328feb48792
- Parent:
- 5:0edf35b6d79a
- Child:
- 7:a24d7156bc02
diff -r 0edf35b6d79a -r 2328feb48792 main.cpp --- a/main.cpp Sun May 03 15:36:37 2015 +0000 +++ b/main.cpp Tue May 05 15:13:06 2015 +0000 @@ -19,7 +19,7 @@ int vInReading; int vBlowerReading; int omronDiff; -int digital_pot_setpoint = 0x3D; //min = 0x7F, max = 0x00 +int digital_pot_setpoint = 0x02; //min = 0x7F, max = 0x00 char filename[] = "/sd/UPASLOG00.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) @@ -47,7 +47,8 @@ while(1){ - omronReading = ads.readADC_SingleEnded(0, 0xC583); // read channel 0 + omronReading = ads.readADC_SingleEnded(0, 0xC583); // read channel 0 PGA = 2 : Full Scale Range = 2.048V + //omronReading = ads.readADC_SingleEnded(0, 0xC183); // read channel 0 PGA = 1 : Full Scale Range = 4.096V vInReading = ads.readADC_SingleEnded(1, 0xD583); // read channel 0 vBlowerReading = ads.readADC_SingleEnded(2, 0xE783); // read channel 0 omronDiff = ads.readADC_Differential(0x8583); // differential channel 2-3