EKG 2Channel

Dependencies:   mbed

Hello this a simple program that reads the ADC Value of pin A0 and A1 and displays them on the serial port /media/uploads/wehner334/ekg_andreas.xlsx

Revision:
1:6e80ddd10594
Parent:
0:b676db63060d
Child:
2:153e3258be9b
--- a/main.cpp	Tue Nov 03 21:39:44 2015 +0000
+++ b/main.cpp	Wed Feb 17 13:24:58 2016 +0000
@@ -1,6 +1,7 @@
 #include "mbed.h"
 
-Ticker toggle_led_ticker;
+//Ticker toggle_led_ticker;
+Ticker debug_ticker;
 Serial pc(SERIAL_TX, SERIAL_RX);
 PwmOut mypwm(D9);
 AnalogIn analog_zero(A0);
@@ -16,15 +17,23 @@
     //led1 = !led1;
 }
 
+/*void debugprint()
+{pc.printf("%.0f  \n", 5000.0);
+    }
+*/
 int main() {
     
     pc.baud(57600);
     // Init the ticker with the address of the function (toggle_led) to be attached and the interval (100 ms)
-    mypwm.period_ms(1000);
-    mypwm.pulsewidth_ms(50);
-    toggle_led_ticker.attach(&measuereandsend, 0.001);
+   // mypwm.period(1000.0);
+    //mypwm.write(0.001);
+    //debug_ticker.attach(&debugprint, 1.0);
+    //toggle_led_ticker.attach(&measuereandsend, 0.001);
     
     while (true) {
+        measuereandsend();
+        
+        
         // Do other things...
     }
 }
\ No newline at end of file