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

Revision:
56:c4d6bdd7c3fb
Parent:
55:f24d70f519cd
Child:
57:0b554f7aa9a3
--- a/main.cpp	Mon Jun 29 14:32:04 2015 +0000
+++ b/main.cpp	Tue Jun 30 03:33:36 2015 +0000
@@ -8,6 +8,8 @@
 #include "SI1145.h"
 #include "NCP5623BMUTBG.h"
 #include "CronoDot.h"
+#include "EEPROM.h"
+#include "AMAS_Serial.h"
 
 #define SERIAL_BAUD_RATE    9600
 #define SCL         20
@@ -26,6 +28,8 @@
 SI1145 lightsensor(p22, p20);
 NCP5623BMUTBG RGB_LED(p22, p20);
 CronoDot RTC(p22, p20);
+EEPROM          E2PROM(p22, p20);
+AMAS_Serial     Menu;
 
 //UPAS0012 CALIBRATION TRANSFER FUNCTION COEFFICIENTS FROM 'UPAS v2 OSU-calibration primary flow data.xlsx'
 //mass flow sensor output signal (x) vs. mass flow (y)
@@ -108,7 +112,14 @@
 
 // Setup and Initialization
 //---------------------------------------------------------------------------------------------//
-   
+
+/*    RGB_LED.set_led(0,0,1);
+    Timer refresh_Timer; 
+    while(refresh_Timer.read_ms() <= 8000) {    // you have 8 seconds to send any one character over the serial bus to open the menu 
+        Menu.Start(pc, E2PROM, RTC);    // loop this to read the serial buffer and open the menu
+    }
+*/
+  
     if(volflowSet==1.0){
         gainFlow = 100;}
     else if(volflowSet==2.0){
@@ -239,7 +250,9 @@
                 
                         
                 if(abs(digital_pot_change)>=50){
+                    digital_pot_set = (int)(digital_pot_set+(int)((10.0*deltaMflow)));
                     RGB_LED.set_led(1,0,0);
+                    
                 }else if(digital_pot_change+digital_pot_set>=digitalpotMax&abs(digital_pot_change)<50){
                     digital_pot_set = digitalpotMax;
                     RGB_LED.set_led(1,0,0);