IDT Optical Sensors / Mbed 2 deprecated OB1203_IDT

Dependencies:   mbed OB1203_example_driver

Revision:
6:aaa2f8fb5123
Parent:
5:ebe305e08430
Child:
7:3ed0f0522b43
--- a/main.cpp	Mon May 14 18:49:12 2018 +0000
+++ b/main.cpp	Mon May 14 19:31:50 2018 +0000
@@ -17,15 +17,18 @@
 Serial pc(USBTX, USBRX,256000);
 Timer t;
 
-int sample_delay = 25; //ms
 
-
+//USER CONFIGURABLE*********
 bool mode = 0; //0 for PS_LS, 1 for PPG
-bool meas_ps = 1;
+bool meas_ps = 0;
 bool spo2 = 1; //0 for HR, 1 for SpO2
-bool intFlagged =0;
 bool afull = 1; //use Afull interrupt--otherwise PPG new data interrupt
 bool meas_temp = 1;
+//****************************
+
+//internal settings
+bool intFlagged =0;
+int sample_delay = 25; //ms
 
 void defaultConfig()
 {
@@ -94,17 +97,17 @@
         ob1203.ppg_int_en = PPG_INT_ON;
     }
     //PPG
-    ob1203.ir_current = 275;
+    ob1203.ir_current = 511; //max 1023. 3FF
     if (spo2)
     {
 //        ob1203.r_current = 0x0FF;
-    ob1203.r_current = 255;
+    ob1203.r_current = 511; //max 511. 1FF
     }
     else 
     {   
         ob1203.r_current = 0;
     }
-    ob1203.ppg_ps_gain = PPG_PS_GAIN_4;
+    ob1203.ppg_ps_gain = PPG_PS_GAIN_2;
     ob1203.ppg_pow_save = PPG_POW_SAVE_OFF;
     ob1203.led_flip = LED_FLIP_OFF;
     ob1203.ch1_can_ana = PPG_CH1_CAN(0);