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
00001 /* mbed Microcontroller Library 00002 * Copyright (c) 2018 ARM Limited 00003 * SPDX-License-Identifier: Apache-2.0 00004 */ 00005 00006 #include "mbed.h" 00007 #include "stats_report.h" 00008 #include "Music.h" 00009 #include "SoundData.h" 00010 00011 DigitalOut led1(LED1); 00012 Music music; 00013 #define SLEEP_TIME 500 // (msec) 00014 #define PRINT_AFTER_N_LOOPS 20 00015 00016 // main() runs in its own thread in the OS 00017 int main() 00018 { 00019 SystemReport sys_state( SLEEP_TIME * PRINT_AFTER_N_LOOPS /* Loop delay time in ms */); 00020 music.init(sound_data,NUM_ELEMENTS); 00021 int count = 0; 00022 while (true) { 00023 // Blink LED and wait 0.5 seconds 00024 music.play_next(); 00025 //wait_us(1); 00026 00027 ++count; 00028 } 00029 }
Generated on Fri Jul 15 2022 16:35:57 by
1.7.2