Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX30003 max32630fthr DS1307
Revision 21:86bd6104d317, committed 2021-06-23
- Comitter:
- parthsagar2010
- Date:
- Wed Jun 23 21:56:51 2021 +0000
- Parent:
- 20:2e999e6568c1
- Commit message:
- channel_selection
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jun 23 20:32:39 2021 +0000
+++ b/main.cpp Wed Jun 23 21:56:51 2021 +0000
@@ -31,7 +31,12 @@
DigitalOut S2(P3_3);
DigitalOut S3(P3_2);
+DigitalIn A(P5_7);
+DigitalIn B(P6_0);
+bool channel_s_1 =false ;
+bool channel_s_2 =false ;
+bool channel_s_3 =false ;
void ecg_config(MAX30003 &ecgAFE);
//BufferedSerial pc(P3_1,P3_0); // Use USB debug probe for serial link static Unbuffered
@@ -251,6 +256,8 @@
// printf("Timer time: %lu ms \n", (time_taken*100));
// t.reset();
// timer_fast.reset();
+
+
if (t==10) //C1
{
@@ -260,6 +267,8 @@
S3=0;
channel_num[0]= {1};
}
+
+
if (t==20) //C2
{
S0=0;
@@ -269,6 +278,8 @@
channel_num[0]= {2};
}
+
+
if (t==30) // C0
{
S0=0;
@@ -277,7 +288,26 @@
S3=0;
channel_num[0]= {0};
t=0;}
+
+
+ if (A==0)
+ {t=50;
+ S0=1;
+ S1=0;
+ S2=0;
+ S3=0;
+ channel_num[0]= {1};
+ }
+
+ if (B==0)
+ {t=60;
+ S0=0;
+ S1=1;
+ S2=0;
+ S3=0;
+ channel_num[0]= {2};
+ }