Interactive Device Design
/
idd_hw5_group_alloy_kl25z
Code for the kl25z component of our project - for group Alloy.
Window.h@0:85181831ea03, 2014-11-10 (annotated)
- Committer:
- douglasc
- Date:
- Mon Nov 10 17:30:55 2014 +0000
- Revision:
- 0:85181831ea03
initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
douglasc | 0:85181831ea03 | 1 | /* Window.h */ |
douglasc | 0:85181831ea03 | 2 | |
douglasc | 0:85181831ea03 | 3 | #ifndef WINDOW_H |
douglasc | 0:85181831ea03 | 4 | #define WINDOW_H |
douglasc | 0:85181831ea03 | 5 | |
douglasc | 0:85181831ea03 | 6 | #include "Servo.h" |
douglasc | 0:85181831ea03 | 7 | #include "mbed.h" |
douglasc | 0:85181831ea03 | 8 | |
douglasc | 0:85181831ea03 | 9 | class Window { |
douglasc | 0:85181831ea03 | 10 | private: |
douglasc | 0:85181831ea03 | 11 | bool windowOpen; |
douglasc | 0:85181831ea03 | 12 | float servoStop; |
douglasc | 0:85181831ea03 | 13 | float windowMovementTimer; |
douglasc | 0:85181831ea03 | 14 | Servo* servo; |
douglasc | 0:85181831ea03 | 15 | Serial* pc; |
douglasc | 0:85181831ea03 | 16 | public: |
douglasc | 0:85181831ea03 | 17 | Window(); |
douglasc | 0:85181831ea03 | 18 | Window(Servo* s, float timer); |
douglasc | 0:85181831ea03 | 19 | bool isWindowOpen(); |
douglasc | 0:85181831ea03 | 20 | bool openWindow(); |
douglasc | 0:85181831ea03 | 21 | bool closeWindow(); |
douglasc | 0:85181831ea03 | 22 | }; |
douglasc | 0:85181831ea03 | 23 | |
douglasc | 0:85181831ea03 | 24 | #endif |