inital commit
Dependencies: mbed wave_player mbed-rtos 4DGL-uLCD-SE SDFileSystem2 PinDetect MMA8452
main.cpp@1:5b8e223e983d, 2013-01-24 (annotated)
- Committer:
- 4180_1
- Date:
- Thu Jan 24 02:59:05 2013 +0000
- Revision:
- 1:5b8e223e983d
- Parent:
- 0:bdbd3d6fc5d5
- Child:
- 2:c2afd0c426af
ver 1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
4180_1 | 1:5b8e223e983d | 1 | |
4180_1 | 1:5b8e223e983d | 2 | #include "mbed.h" |
4180_1 | 1:5b8e223e983d | 3 | #include "SDFileSystem.h" |
4180_1 | 1:5b8e223e983d | 4 | #include "wave_player.h" |
4180_1 | 1:5b8e223e983d | 5 | |
4180_1 | 1:5b8e223e983d | 6 | |
4180_1 | 1:5b8e223e983d | 7 | SDFileSystem sd(p5, p6, p7, p8, "sd"); //SD card |
4180_1 | 1:5b8e223e983d | 8 | |
4180_1 | 1:5b8e223e983d | 9 | AnalogOut DACout(p18); |
4180_1 | 1:5b8e223e983d | 10 | |
4180_1 | 1:5b8e223e983d | 11 | wave_player waver(&DACout); |
4180_1 | 1:5b8e223e983d | 12 | |
4180_1 | 1:5b8e223e983d | 13 | int main() |
4180_1 | 1:5b8e223e983d | 14 | { |
4180_1 | 1:5b8e223e983d | 15 | FILE *wave_file; |
4180_1 | 1:5b8e223e983d | 16 | printf("\n\n\nHello, wave world!\n"); |
4180_1 | 1:5b8e223e983d | 17 | wave_file=fopen("/sd/sample.wav","r"); |
4180_1 | 1:5b8e223e983d | 18 | waver.play(wave_file); |
4180_1 | 1:5b8e223e983d | 19 | fclose(wave_file); |
4180_1 | 1:5b8e223e983d | 20 | } |