
elec350
Fork of elec350 by
button.h@16:721e41936a07, 2015-11-19 (annotated)
- Committer:
- rmerrisonhort
- Date:
- Thu Nov 19 10:06:45 2015 +0000
- Revision:
- 16:721e41936a07
- Parent:
- 8:a82ea42026db
Added InternalTemperature class.
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 | 8:a82ea42026db | 13 | float getPulse(float timeout=-1.0f); |
rmerrisonhort | 0:753cf4c2738f | 14 | }; |
rmerrisonhort | 0:753cf4c2738f | 15 | |
rmerrisonhort | 4:549d1d8ca969 | 16 | #endif |
rmerrisonhort | 4:549d1d8ca969 | 17 |