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.
Diff: play_buzzer.h
- Revision:
- 1:50204a498764
- Parent:
- 0:e44696c93c6b
- Child:
- 5:d879dead6768
--- a/play_buzzer.h Thu Jan 10 07:33:55 2019 +0000
+++ b/play_buzzer.h Thu Jan 10 08:26:13 2019 +0000
@@ -1,22 +1,23 @@
-#ifndef MBED_BEEP_H
+#ifndef PLAY_BUZZER_H
#define MBED_BEEP_H
#include "mbed.h"
namespace mbed {
-
+//NAME OF CLASS
class play_buzzer {
+//INITIALIZE VARIABLES USED IN CLASS
private :
PinName _pin;
PwmOut _pwm;
Timeout toff;
+//FUNCTIONS AND CONSTRUCTOR
public:
play_buzzer(PinName);
- void beep (float frequency, int time);
+ void beep (int notes, int tones);
void nobeep();
- void Play_tunes(int notes, int tones);
- int play();
+ int play(int song);
void setPin(PinName pin);
PinName getPin();
};