fork the master

Dependencies:   TextLCD mbed-rtos mbed

Fork of Pacemaker by pacemaker team

Revision:
15:4cd550c14f97
Parent:
14:94f1b9e3eb43
Child:
17:6c44d5317c49
--- a/main.cpp	Mon Dec 01 23:36:53 2014 +0000
+++ b/main.cpp	Tue Dec 02 00:01:31 2014 +0000
@@ -2,8 +2,10 @@
  * Pacemaker MBED code
  *
  * CIS541 Embedded Systems for Life Critical Applications
- * Author: Jing Qiu
- *         Michael Frederick
+ * Authors: Jing Qiu
+ *          Michael Frederick
+ *          Tim Hu
+ *          Alex Little
  * 
  */
 
@@ -24,6 +26,7 @@
 #define PULSE_WIDTH_V 200
 #define PULSE_WIDTH_A 100
 
+TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD16x2);
 
 int LRI_h = 1666;
 int LRI_l = 666;
@@ -31,7 +34,7 @@
 bool setObservation = false;
 
 Serial pc(USBTX, USBRX);
-TextLCD myPanel(p15,p16,p17,p18,p19,p20,TextLCD::LCD16x2);
+
 char mode = 'N';
 
 int a_clock;
@@ -40,8 +43,8 @@
 
 int beat;
 
-InterruptIn atrial_int(p17);
-InterruptIn vent_int(p18);
+InterruptIn atrial_int(p21); // double check me
+InterruptIn vent_int(p22); // me too
 
 const int a_pace = 5; //pin 21  a pace output
 const int v_pace = 3; //pin 23  v pace output
@@ -135,8 +138,9 @@
     while(1)
     {
         wait_ms(observation_interval);
-        printf("BPM: %d\r\n",beat*60000/observation_interval);
-        myPanel.printf("BPM: %d\n\n",beat*60000/observation_interval);
+        pc.printf("BPM: %d\r\n",beat*60000/observation_interval);
+        lcd.cls();
+        lcd.printf("BPM: %d\r\n", beat*60000/observation_interval);
         beat=0;
     }
 }