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.
main.cpp@0:bbd9650bcfe0, 2019-07-22 (annotated)
- Committer:
- joshdavy
- Date:
- Mon Jul 22 11:06:30 2019 +0000
- Revision:
- 0:bbd9650bcfe0
music;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| joshdavy | 0:bbd9650bcfe0 | 1 | #include "mbed.h" |
| joshdavy | 0:bbd9650bcfe0 | 2 | #include "Music.h" |
| joshdavy | 0:bbd9650bcfe0 | 3 | #include "SoundData.h" |
| joshdavy | 0:bbd9650bcfe0 | 4 | |
| joshdavy | 0:bbd9650bcfe0 | 5 | DigitalOut myled(LED1); |
| joshdavy | 0:bbd9650bcfe0 | 6 | |
| joshdavy | 0:bbd9650bcfe0 | 7 | int main() { |
| joshdavy | 0:bbd9650bcfe0 | 8 | Music audio; |
| joshdavy | 0:bbd9650bcfe0 | 9 | audio.init(sound_data,NUM_ELEMENTS); |
| joshdavy | 0:bbd9650bcfe0 | 10 | while (1) { |
| joshdavy | 0:bbd9650bcfe0 | 11 | wait_us(0.01); |
| joshdavy | 0:bbd9650bcfe0 | 12 | audio.play_next(); |
| joshdavy | 0:bbd9650bcfe0 | 13 | } |
| joshdavy | 0:bbd9650bcfe0 | 14 | |
| joshdavy | 0:bbd9650bcfe0 | 15 | } |