ECE 4180 - Final Project Team / Mbed 2 deprecated WalkieTalkie

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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Speaker.h Source File

Speaker.h

00001 #include "mbed.h"
00002 
00003 /** 
00004 * Speaker Class
00005 */
00006 
00007 class Speaker {
00008 public:
00009 /** Assign a pin to Speaker.
00010 * @param Pin The pin the Speaker will be assigned to
00011 */
00012     Speaker(PinName pin);
00013     /** Write a value a pin to Speaker.
00014 * @param value 
00015 */
00016     void rawWrite(float value);
00017     /**
00018     *  @param value Writes a scaled uint8_t from RF transmission to the speaker
00019     */
00020     void write (uint8_t value);
00021     /**
00022     * Writes 0 to the analogOut to completely turn off the speaker
00023     */
00024     void turnOff();
00025     
00026 private:
00027     AnalogOut _pin;
00028     float dc;
00029 };