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.
Dependencies: mbed wave_player SDFileSystem
main.cpp@2:fca0a4b96e1b, 2020-05-20 (annotated)
- Committer:
- chessdsbr
- Date:
- Wed May 20 21:55:12 2020 +0000
- Revision:
- 2:fca0a4b96e1b
- Parent:
- 0:bdbd3d6fc5d5
Songs
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
| mbed_official | 0:bdbd3d6fc5d5 | 2 | #include "SDFileSystem.h" |
| chessdsbr | 2:fca0a4b96e1b | 3 | #include <wave_player.h> |
| chessdsbr | 2:fca0a4b96e1b | 4 | DigitalOut Led(LED1); |
| chessdsbr | 2:fca0a4b96e1b | 5 | AnalogOut DAcout (PTE30); |
| chessdsbr | 2:fca0a4b96e1b | 6 | SDFileSystem sd(D11, D12, D13, D10, "sd"); // the pinout on the mbed Cool Components workshop board |
| chessdsbr | 2:fca0a4b96e1b | 7 | wave_player waver(&DAcout); |
| mbed_official | 0:bdbd3d6fc5d5 | 8 | int main() { |
| chessdsbr | 2:fca0a4b96e1b | 9 | FILE *wave_file; |
| chessdsbr | 2:fca0a4b96e1b | 10 | wait(0.3); |
| chessdsbr | 2:fca0a4b96e1b | 11 | wave_file=fopen("/sd/gano.wav","r"); |
| chessdsbr | 2:fca0a4b96e1b | 12 | waver.play(wave_file); |
| chessdsbr | 2:fca0a4b96e1b | 13 | fclose(wave_file); |
| chessdsbr | 2:fca0a4b96e1b | 14 | while(1) |
| chessdsbr | 2:fca0a4b96e1b | 15 | {} |
| mbed_official | 0:bdbd3d6fc5d5 | 16 | |
| mbed_official | 0:bdbd3d6fc5d5 | 17 | } |