ECE 4180 - Final Project Team / Mbed 2 deprecated WalkieTalkie

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

Speaker.h

Committer:
Nurchu
Date:
2018-04-25
Revision:
33:5d86c111d9bc
Parent:
20:e068469ffb89
Child:
49:8ae98a6d48c0

File content as of revision 33:5d86c111d9bc:

#include "mbed.h"

class Speaker {
public:
    Speaker(PinName pin);
    
    void rawWrite(float 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;
};