test publish

Dependencies:   mbed GroveEarbudSensor

Speaker.h

Committer:
age2pierre
Date:
2016-04-14
Revision:
13:879d678baf64
Parent:
5:ee265ab0752d

File content as of revision 13:879d678baf64:

#ifndef _SPEAKER_H_
#define _SPEAKER_H_

#include "mbed.h"
#include "Notes.h"

/**
This class is used to generate music note through a speaker by  sending a pwm signal
*/
class Speaker {
    private :
        PwmOut* pin;
        float pulseWidth;
    protected :
    public :
        Speaker(PwmOut* argPin);
        bool setPulseWidth(float argPulseWidth);
        void play(Notes note);
        void mute();
};

#endif