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.
Music.h
00001 #ifndef MUSIC_H 00002 #define MUSIC_H 00003 00004 /*Music Class*/ 00005 #include "mbed.h" 00006 00007 00008 /** Music Class 00009 00010 @brief The Music Class handles the playing of the background music while playing 00011 the game. It uses the buzzer with PWM audio to play complex waveforms through 00012 a standard 5V pin of the board. See presentation for more detail how this works. 00013 @version 1.0 00014 00015 @author Joshua Davy el17jd 00016 00017 @date April 2019 00018 00019 */ 00020 00021 class Music { 00022 00023 public: 00024 Music(); 00025 ~Music(); 00026 void init(const int* data,int length); 00027 void play_next(); 00028 00029 00030 private: 00031 const int* _data; 00032 int _index; 00033 int _length; 00034 00035 00036 }; 00037 #endif
Generated on Fri Jul 15 2022 16:35:57 by
1.7.2