Difference between revisions of "Component: Buzzer (Audio Output)"
Line 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 36: | Line 38: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 69: | Line 73: | ||
{{Fcfile|Basic Buzzer Example.fcfx|Basic Buzzer Example}} | {{Fcfile|Basic Buzzer Example.fcfx|Basic Buzzer Example}} | ||
− | == | + | ==Macro reference== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 14:09, 20 January 2023
Author | Matrix TSL |
Version | 1.0 |
Category | Audio Output |
Contents
Buzzer component
Drives a simple fixed frequency buzzer in hardware and simulates the sound of a buzzer in simulation. To actually drive a buzzer you would have to amplify the signal from the microcontroller using a transistor or MOSFET.
Component Source Code
Please click here for the component source code: FC_Comp_Source_Buzzer.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Depending on your Buzzer you may need to amplify the signal from the microcontroller using a NPN transistor or N channel FET.
A basic buzzer example using all the buzzer functions.
It should be noted that if you have a single BuzzerOn component with no loop, the buzzer sound will stop when the simulation stops.
The pin will remain high.
While the buzzer is on, the simulation tone is not continuous, it rapidly pulses, the pin will remain high.
That is not a bug with the component
Macro reference
![]() |
BuzzerOff |
Switch Off the Buzzer | |
![]() |
Return |
![]() |
BuzzerOn |
Switch On the Buzzer | |
![]() |
Return |
![]() |
BuzzerOnDelay |
Switch the Buzzer on for a fixed amount of time | |
![]() |
Time |
Time in milliseconds to keep the buzzer on | |
![]() |
Return |