Words in Typing mode FINAL
Dependencies: SDFileSystem emic2 mbed-rtos mbed
Fork of BAT_Type_word_FINAL by
Diff: button.cpp
- Revision:
- 41:560ee7866781
- Parent:
- 39:8cc80f0b4398
diff -r 85be3490d3a7 -r 560ee7866781 button.cpp --- a/button.cpp Sun Dec 03 23:10:29 2017 +0000 +++ b/button.cpp Sun Dec 03 23:44:27 2017 +0000 @@ -10,62 +10,15 @@ // button constructor button::button(PwmOut servo, DigitalIn pb, int id) : servo(servo), pb(pb), state(0), press(0), id(id), type(0) {} -/*button::button(PwmOut servo, DigitalIn pb, AnalogIn lp) - : servo(servo), pb(pb), linpot(lp), press(0), state(0) {} -*/ -//Serial pc(USBTX, USBRX); - + // FUNCTIONS -// get servo pin -PwmOut button::getServoPin() -{ - return servo; -} - -// get servo pin -void button::setState(int mystate) -{ - state = mystate; -} - -void button::setPress(int mypress) -{ - press = mypress; -} - -// get servo pin -/*void button::setMode(int mymode) -{ - mode = mymode; -}*/ - -// get current state of the button -int button::getState() -{ - return state; -} - -int button::getID() -{ - return id; -} - - int button::getPress() { //pc.printf("%d", press); return press; } -// get current state of the button -int button::getLp() -{ - /* if (linpot < 2) - return 1; - else*/ - return 0; -} // move servo into the slot void button::moveServoIn()