k

Dependencies:   MAX30003 max32630fthr DS1307

Revision:
24:bf49bdcb3a40
Parent:
23:288c5d1babd1
--- a/main.cpp	Tue Aug 03 19:39:42 2021 +0000
+++ b/main.cpp	Tue Dec 21 02:00:19 2021 +0000
@@ -135,6 +135,7 @@
     uint8_t p_4 = 0;
    // uint8_t channel_num= 1;
     uint8_t channel_num[1]= {0};
+    uint8_t battery_level[1] ={30};
     uint8_t data_len_1 = 0;
     uint8_t data_len_2 = 0;
     uint32_t packet_1 = 0;
@@ -199,7 +200,7 @@
     {
        
     
-    if ((onesec_counter>=112))
+    if ((onesec_counter>=125))
     {
       tic++;
         
@@ -225,6 +226,8 @@
       
       pc.write((uint8_t *)channel_num, sizeof(channel_num));
       
+      pc.write((uint8_t *)battery_level, sizeof(battery_level));
+       
       onesec_counter_temp = onesec_counter * 2;
       data_len_1 = onesec_counter_temp & 0xff;
       data_len_2 = (onesec_counter_temp >> 8) & 0xff;
@@ -299,22 +302,15 @@
     //  S3=0;
       channel_num[0]= {1};}
       
-      if (C==0)  // 
+    /*  if (C==0)  // 
      {tic=70; 
       S0=0; 
       S1=1;
    //   S2=0;
     //  S3=0;
-      channel_num[0]= {2};}
-     
+      channel_num[0]= {2};}*/
      
     
-    
-    
-    
-    
-    
-    
        } 
         // Read back ECG samples from the FIFO 
         else if((ecgFIFOIntFlag==1))// && (timerflag == 0))