k

Dependencies:   MAX30003 max32630fthr DS1307

Files at this revision

API Documentation at this revision

Comitter:
parthsagar2010
Date:
Tue Dec 21 18:28:35 2021 +0000
Parent:
24:bf49bdcb3a40
Commit message:
k

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r bf49bdcb3a40 -r 381f9fbad85d main.cpp
--- a/main.cpp	Tue Dec 21 02:00:19 2021 +0000
+++ b/main.cpp	Tue Dec 21 18:28:35 2021 +0000
@@ -20,8 +20,8 @@
  
 DigitalOut S0(P4_0);
 DigitalOut S1(P5_6);
-//DigitalOut S2(P7_2);
-//DigitalOut S3(P7_2);
+DigitalOut S2(P7_2);
+DigitalOut S3(P7_2);
 
 //channel feedback
 DigitalIn A(P6_0); //P17
@@ -74,8 +74,8 @@
  
      S0=0;    //C0
      S1=0;
-  // S2=0;
-  // S3=0;
+     S2=0;
+      S3=0;
    
  
  
@@ -142,7 +142,7 @@
     uint8_t cksm_1 = 0;
     uint8_t cksm_2 = 0;
     uint8_t header_device_id[3] = {0,0,210};
-    //uint8_t header_device_id[3] = {0,0,1};     //for rahul
+    //uint8_t header_device_id[3] = {0,0,1};     
     uint8_t header_packet_type[2] = {0,2};
     
     uint8_t ending[5] = {'@','#','%','!','7'};
@@ -151,8 +151,6 @@
      int sampleps = 0;
      
     char buf[20];
-   // pc.write("Welcome",8*sizeof(char));
-   // printf("In the main loop"); //printf("In the main loop");
     bool flag_first = false;
     bool timestamp_reader = false;
        
@@ -164,7 +162,6 @@
      {     
      scanf("%s",buf);
     //printf("The entered string is %s : \n ",buf);*/
-   // buf[20] = 1621297647;
      packet_1 = atoi(buf);
      set_time(packet_1);
      
@@ -200,7 +197,7 @@
     {
        
     
-    if ((onesec_counter>=125))
+    if ((onesec_counter>=115))
     {
       tic++;
         
@@ -261,16 +258,16 @@
      {
       S0=1; 
       S1=0;
-   //   S2=0;
-   //   S3=0;
+      S2=0;
+      S3=0;
      channel_num[0]= {1};
      } 
      if (tic==20)    //C2
      {
       S0=0; 
       S1=1;
-    //  S2=0;
-    //  S3=0;
+      S2=0;
+      S3=0;
       channel_num[0]= {2};
       }
          
@@ -278,8 +275,8 @@
      {
       S0=0; 
       S1=0;
-    // S2=0;
-    // S3=0;
+     S2=0;
+     S3=0;
      channel_num[0]= {0};
      tic=0;} 
      
@@ -290,25 +287,25 @@
     {tic=50; 
       S0=0; 
       S1=0;
-    //  S2=0;
-   //  S3=0;
+      S2=0;
+     S3=0;
      channel_num[0]= {0};}
      
      if (B==0)  // 
      {tic=60;
       S0=1; 
       S1=0;
-   //   S2=0;
-    //  S3=0;
+      S2=0;
+      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};}*/
+      S2=0;
+      S3=0;
+      channel_num[0]= {2};}
      
     
        }