AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
board/Buzzer.h@27:f29805113454, 2017-02-09 (annotated)
- Committer:
- sillevl
- Date:
- Thu Feb 09 12:28:56 2017 +0000
- Revision:
- 27:f29805113454
- Parent:
- 11:50572814f73e
ARCHIVE WIP, not working (crashes, cause unknown)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sillevl | 4:2c91c9eccf3a | 1 | #ifndef BUZZER_H |
sillevl | 4:2c91c9eccf3a | 2 | #define BUZZER_H |
sillevl | 4:2c91c9eccf3a | 3 | |
sillevl | 4:2c91c9eccf3a | 4 | #include "mbed.h" |
sillevl | 4:2c91c9eccf3a | 5 | |
sillevl | 4:2c91c9eccf3a | 6 | class Buzzer{ |
sillevl | 4:2c91c9eccf3a | 7 | |
sillevl | 4:2c91c9eccf3a | 8 | public: |
sillevl | 11:50572814f73e | 9 | Buzzer(PinName buzzerPin); |
sillevl | 11:50572814f73e | 10 | void playNote(float frequency, float duration = 100, float volume = 1.0); |
sillevl | 5:be598835bab0 | 11 | void startupBeep(); |
sillevl | 11:50572814f73e | 12 | |
sillevl | 11:50572814f73e | 13 | private: |
sillevl | 11:50572814f73e | 14 | |
sillevl | 11:50572814f73e | 15 | |
sillevl | 11:50572814f73e | 16 | PwmOut out; |
sillevl | 4:2c91c9eccf3a | 17 | }; |
sillevl | 4:2c91c9eccf3a | 18 | |
sillevl | 4:2c91c9eccf3a | 19 | #endif |