Fork of original senior design repo
Dependencies: SDFileSystem mbed-rtos mbed wave_player emic2
Fork of BAT_senior_design by
Diff: button.h
- Revision:
- 20:c5df903f068a
- Parent:
- 18:ceac47be2e64
- Child:
- 23:b2e53ce54b3e
--- a/button.h Fri Oct 27 15:18:28 2017 +0000
+++ b/button.h Wed Nov 01 15:22:13 2017 +0000
@@ -12,25 +12,30 @@
DigitalIn pb;
int state; // where is the button (0 - 4)
int press; // is the button up or down
+ int id; // this is the ID, each button should have a unique id
// int mode; // is the system in reading or typing mode
- // AnalogIn linpot;
+ //AnalogIn linpot;
public:
// constructors
button(); // Default
- button(PwmOut servo, DigitalIn pb);
+ button(PwmOut servo, DigitalIn pb, int id);
+ //button(PwmOut servo, DigitalIn pb, AnalogIn linpot);
// button(PwmOut servo, DigitalIn pb, AnalogIn linpot);
// functions
PwmOut getServoPin(); // get the servo pin
//void setState(int state); // set state
//void setMode(int mode); // set mode
- void setState(int); // determine what state the button is in - up or down
+ void setState(int); // set what state the button is in - up or down
+ void setPress(int); // set the button press
void moveServoIn(); // move servo into the slot
void moveServoOut(); // move servo out of the slot
+ int getID();
int updateState();
int getState();
int getPress();
+ int getLp();
};
#endif
\ No newline at end of file
