Component: Piezo Sounder (Audio Output): Difference between revisions
Appearance
No edit summary |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 82: | Line 82: | ||
[[File:BuzzerWire.jpg]] | [[File:BuzzerWire.jpg]] | ||
| Line 87: | Line 95: | ||
==Macro reference== | ==Macro reference== | ||
{| class="wikitable | ===BuzzerBeep=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''BuzzerBeep''' | ||
|- | |- | ||
| colspan="2" | Switches the buzzer on and off automatically to allow for a series of beeps | | colspan="2" | Switches the buzzer on and off automatically to allow for a series of beeps | ||
| Line 120: | Line 129: | ||
{| class="wikitable | ===BuzzerOnDelay=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''BuzzerOnDelay''' | ||
|- | |- | ||
| colspan="2" | Switch the Buzzer on for a fixed amount of time | | colspan="2" | Switch the Buzzer on for a fixed amount of time | ||
| Line 141: | Line 151: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:23, 13 July 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | Audio Output |
Piezo Sounder component
Drives a simple variable frequency piezo sounder in hardware and simulates the sound in simulation. To actually drive a piezo you may have to amplify the signal from the microcontroller using a transistor or MOSFET.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_PiezoSounder.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_PiezoSounder.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Here is a simple example that will create a siren effect using a piezo sounder.
Piezo Siren
Depending on your Piezo Sounder you may need to amplify the signal from the microcontroller using a NPN transistor or N channel FET.
Macro reference
BuzzerBeep
BuzzerOnDelay
| BuzzerOnDelay | |
| Switch the Buzzer on for a fixed amount of time | |
| Time | |
| Time in milliseconds to keep the buzzer on | |
| Frequency | |
| Frequency to output in Hz | |
| Return | |
Property reference
| Properties | |
| Output Pin | |
| Pin used to drive the output to the buzzer | |
