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.
Revision 4:811ddbbdc15d, committed 2017-03-02
- Comitter:
- riyood
- Date:
- Thu Mar 02 13:37:47 2017 +0000
- Parent:
- 3:937505b99ca7
- Commit message:
- changing the pins
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 937505b99ca7 -r 811ddbbdc15d main.cpp
--- a/main.cpp Wed Mar 01 21:12:13 2017 +0000
+++ b/main.cpp Thu Mar 02 13:37:47 2017 +0000
@@ -2,20 +2,21 @@
//#include "Buzzer.h"
-DigitalOut myBuzzer(D6);
-DigitalOut myLedGreen(LED1);
-DigitalOut myLedRed(D9);
+DigitalOut myBuzzer(PC_9);
+DigitalOut myLedGreen(PA_5);
+DigitalOut myLedRed(PC_8);
DigitalIn myButton(PC_13);
-DigitalIn myPulse(D7);
+DigitalIn myPulse(PA_8);
Timer timer;
float getpulse(void);
void Sound_AlarmBuzzer(void);
void RedLed_flash (void);
+
int main()
{
- myBuzzer=0;
+
myLedGreen=0;
float HeartBeat=0.0f;
@@ -32,7 +33,7 @@
printf("Heart Beat is: %5.1f\n\r",HeartBeat);
- if (HeartBeat < 50.0f) {
+ if (HeartBeat < 40.0f) {
printf( "Warning, low Heartbeat \n\r");
while(myButton == 1) {
@@ -41,7 +42,7 @@
}
deepsleep();
}
- if (HeartBeat > 90.0f) {
+ if (HeartBeat > 120.0f) {
printf("Warning, high HeartBeart \n\r");
while(myButton == 1) {