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.
Dependencies: mbed 4DGL-uLCD-SE mbed-rtos nRF24L01P
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 };
Generated on Tue Jul 12 2022 11:14:19 by
1.7.2