Pacemaker code Implementation for SFWRENG 3K04
Dependencies: FXOS8700Q Queue mbed-rtos mbed
Fork of Pacemaker by
Diff: hardware.cpp
- Revision:
- 16:08d5e5a3ee74
- Parent:
- 10:0e0130742e87
- Child:
- 19:d58e1e1a9a24
--- a/hardware.cpp Wed Nov 16 15:19:20 2016 +0000 +++ b/hardware.cpp Thu Nov 17 04:03:25 2016 +0000 @@ -2,12 +2,8 @@ #include "hardware.h" #include "mbed.h" -PwmOut atrium(PTC10); -PwmOut ventricle(PTC11); -Serial pc(USBTX,USBRX); - -hardware::hardware(): atrium(PTC10) , ventricle(PTC11) , pc(USBTX,USBRX){ +hardware::hardware(): atrium(PTC12),ventricle(PTC12),pc(USBTX,USBRX),sense(PTB2){ pc.baud(9600); } @@ -27,4 +23,8 @@ PwmOut* v = &ventricle; return v; } -} \ No newline at end of file +} + +double hardware::getSense(){ + return sense.read(); +}