Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of hapticFeedback by
hapticFeedback.h@0:ea2b9b15a433, 2015-06-26 (annotated)
- Committer:
- perr1940
- Date:
- Fri Jun 26 22:59:18 2015 +0000
- Revision:
- 0:ea2b9b15a433
- Child:
- 1:06fef55a7268
initial publish
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| perr1940 | 0:ea2b9b15a433 | 1 | #ifndef HAPTIC_H |
| perr1940 | 0:ea2b9b15a433 | 2 | #define HAPTIC_H |
| perr1940 | 0:ea2b9b15a433 | 3 | |
| perr1940 | 0:ea2b9b15a433 | 4 | #include "mbed.h" |
| perr1940 | 0:ea2b9b15a433 | 5 | #include "HipControl.h" |
| perr1940 | 0:ea2b9b15a433 | 6 | |
| perr1940 | 0:ea2b9b15a433 | 7 | extern bool hapticOn; |
| perr1940 | 0:ea2b9b15a433 | 8 | |
| perr1940 | 0:ea2b9b15a433 | 9 | class MotorMusic |
| perr1940 | 0:ea2b9b15a433 | 10 | { |
| perr1940 | 0:ea2b9b15a433 | 11 | public: |
| perr1940 | 0:ea2b9b15a433 | 12 | MotorMusic(HipControl &left, HipControl &right); |
| perr1940 | 0:ea2b9b15a433 | 13 | void check(); |
| perr1940 | 0:ea2b9b15a433 | 14 | void playIronMan(); |
| perr1940 | 0:ea2b9b15a433 | 15 | void playArpeggio(); |
| perr1940 | 0:ea2b9b15a433 | 16 | void playDH(); |
| perr1940 | 0:ea2b9b15a433 | 17 | void playLock(); |
| perr1940 | 0:ea2b9b15a433 | 18 | void playUnlock(); |
| perr1940 | 0:ea2b9b15a433 | 19 | void setDefault(float a); |
| perr1940 | 0:ea2b9b15a433 | 20 | private: |
| perr1940 | 0:ea2b9b15a433 | 21 | void song(); |
| perr1940 | 0:ea2b9b15a433 | 22 | void init(); |
| perr1940 | 0:ea2b9b15a433 | 23 | Timer time; |
| perr1940 | 0:ea2b9b15a433 | 24 | HipControl _left; |
| perr1940 | 0:ea2b9b15a433 | 25 | HipControl _right; |
| perr1940 | 0:ea2b9b15a433 | 26 | bool musicFlag; |
| perr1940 | 0:ea2b9b15a433 | 27 | const float *ptrNotes; |
| perr1940 | 0:ea2b9b15a433 | 28 | const float *ptrTimes; |
| perr1940 | 0:ea2b9b15a433 | 29 | int count_max; |
| perr1940 | 0:ea2b9b15a433 | 30 | int count; |
| perr1940 | 0:ea2b9b15a433 | 31 | float pwmDefault; |
| perr1940 | 0:ea2b9b15a433 | 32 | |
| perr1940 | 0:ea2b9b15a433 | 33 | }; |
| perr1940 | 0:ea2b9b15a433 | 34 | |
| perr1940 | 0:ea2b9b15a433 | 35 | #endif |
| perr1940 | 0:ea2b9b15a433 | 36 | |
| perr1940 | 0:ea2b9b15a433 | 37 | extern void initializeHapticFeedback(int); |
| perr1940 | 0:ea2b9b15a433 | 38 | extern void hapticMaintenance(); |
