ECE 4180 - Final Project Team / Mbed 2 deprecated WalkieTalkie

Dependencies:   mbed 4DGL-uLCD-SE mbed-rtos nRF24L01P

Speaker.h

Committer:
drechtmann3
Date:
2018-04-30
Revision:
49:8ae98a6d48c0
Parent:
33:5d86c111d9bc

File content as of revision 49:8ae98a6d48c0:

#include "mbed.h"

/** 
* Speaker Class
*/

class Speaker {
public:
/** Assign a pin to Speaker.
* @param Pin The pin the Speaker will be assigned to
*/
    Speaker(PinName pin);
    /** Write a value a pin to Speaker.
* @param value 
*/
    void rawWrite(float value);
    /**
    *  @param value Writes a scaled uint8_t from RF transmission to the speaker
    */
    void write(uint8_t value);
    /**
    * Writes 0 to the analogOut to completely turn off the speaker
    */
    void turnOff();
    
private:
    AnalogOut _pin;
    float dc;
};