
elec350
Fork of elec350 by
button.h@7:aa63d1e53be6, 2015-10-20 (annotated)
- Committer:
- rmerrisonhort
- Date:
- Tue Oct 20 14:06:30 2015 +0000
- Revision:
- 7:aa63d1e53be6
- Parent:
- 5:f2c1ff02e333
- Child:
- 8:a82ea42026db
Changed Led methods to On and Off.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rmerrisonhort | 0:753cf4c2738f | 1 | #ifndef _BUTTON_H_ |
rmerrisonhort | 0:753cf4c2738f | 2 | #define _BUTTON_H_ |
rmerrisonhort | 0:753cf4c2738f | 3 | |
rmerrisonhort | 0:753cf4c2738f | 4 | #include "mbed.h" |
rmerrisonhort | 3:998b7d011f2a | 5 | #include <string> |
rmerrisonhort | 3:998b7d011f2a | 6 | |
rmerrisonhort | 0:753cf4c2738f | 7 | class Button { |
rmerrisonhort | 0:753cf4c2738f | 8 | private: |
rmerrisonhort | 0:753cf4c2738f | 9 | DigitalIn* pin; |
rmerrisonhort | 0:753cf4c2738f | 10 | public: |
rmerrisonhort | 3:998b7d011f2a | 11 | Button(string name); |
rmerrisonhort | 0:753cf4c2738f | 12 | bool isPressed(); |
rmerrisonhort | 7:aa63d1e53be6 | 13 | float getPulse(); |
rmerrisonhort | 0:753cf4c2738f | 14 | }; |
rmerrisonhort | 0:753cf4c2738f | 15 | |
rmerrisonhort | 4:549d1d8ca969 | 16 | #endif |
rmerrisonhort | 4:549d1d8ca969 | 17 |