Pacemaker code Implementation for SFWRENG 3K04
Dependencies: mbed Queue mbed-rtos FXOS8700Q
Fork of Pacemaker by
SWFRENG 3K04 Project to design, develop, and document a functional pacemaker.
The project uses the Freescale K64F Microcontroller and C++ mbed library.
Diff: hardware.cpp
- Revision:
- 16:08d5e5a3ee74
- Parent:
- 10:35b259e70c9a
- Child:
- 19:d58e1e1a9a24
diff -r 3b8acee3510d -r 08d5e5a3ee74 hardware.cpp --- 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(); +}