
Working read code with mode button
Dependencies: SDFileSystem emic2 mbed-rtos mbed
Fork of BAT_senior_design_Testnew by
Diff: button.cpp
- Revision:
- 15:b80dde24e9bc
- Parent:
- 12:21268d8bf979
- Child:
- 16:581a3b02f4c3
--- a/button.cpp Wed Oct 18 14:06:19 2017 +0000 +++ b/button.cpp Wed Oct 18 14:41:04 2017 +0000 @@ -1,20 +1,25 @@ #include "mbed.h" #include "button.h" +// button constructor button::button(PwmOut servo, DigitalIn pb) : servo(servo), pb(pb) {} // FUNCTIONS + +// get servo pin PwmOut button::getServoPin() { return servo; } -int button::getState() +// get current state of the button +/*int button::getState() { return state; -} +}*/ +// move servo into the slot void button::moveServoIn() { //myled = 1; @@ -25,6 +30,7 @@ } } +// move servo out of the slot void button::moveServoOut() { //myled = 0;