Sakis Kasampalis
/
cricket
Cricket (insect) emulation
Fork of talking by
cricket.h@3:1b91d910dabd, 2017-02-11 (annotated)
- Committer:
- faif
- Date:
- Sat Feb 11 15:49:06 2017 +0000
- Revision:
- 3:1b91d910dabd
- Parent:
- 2:c6c74e788985
Reorganize code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
faif | 2:c6c74e788985 | 1 | #ifndef CRICKET_H |
faif | 2:c6c74e788985 | 2 | #define CRICKET_H |
faif | 2:c6c74e788985 | 3 | |
faif | 2:c6c74e788985 | 4 | Ticker rhythm; |
faif | 2:c6c74e788985 | 5 | LocalFileSystem fs("local"); // required even if it appears like it's not used |
faif | 2:c6c74e788985 | 6 | |
faif | 2:c6c74e788985 | 7 | DigitalIn button(p20); |
faif | 2:c6c74e788985 | 8 | DigitalOut led(LED1); |
faif | 2:c6c74e788985 | 9 | AnalogOut headphones(p18); |
faif | 2:c6c74e788985 | 10 | |
faif | 2:c6c74e788985 | 11 | void myrhythm(); |
faif | 2:c6c74e788985 | 12 | void waitForButton(DigitalOut& led, DigitalIn& button); |
faif | 2:c6c74e788985 | 13 | void preloadFile(char* clip, int size, const char* path); |
faif | 2:c6c74e788985 | 14 | void playSound(char* clip, int size, AnalogOut& headphones); |
faif | 2:c6c74e788985 | 15 | void randomPause(); |
faif | 2:c6c74e788985 | 16 | |
faif | 2:c6c74e788985 | 17 | #endif |