Difference between revisions of "Component: Buzzer (Audio Output)"
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray...") |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
==Buzzer component== | ==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. | 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 Pack== | ||
+ | |||
+ | BASICIO | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
''No detailed description exists yet for this component'' | ''No detailed description exists yet for this component'' | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 26: | Line 50: | ||
[[File:BuzzerWire.jpg]] | [[File:BuzzerWire.jpg]] | ||
+ | |||
+ | |||
+ | |||
+ | 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 | ||
+ | |||
+ | {{Fcfile|Basic Buzzer Example.fcfx|Basic Buzzer Example}} | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
Line 95: | Line 133: | ||
|- | |- | ||
| colspan="2" | Time in milliseconds to keep the buzzer on | | colspan="2" | Time in milliseconds to keep the buzzer on | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 161: | Line 168: | ||
|- | |- | ||
| colspan="2" | Frequency of the buzzer in Hz to drive the simulation | | colspan="2" | Frequency of the buzzer in Hz to drive the simulation | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 17:27, 9 November 2022
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 Pack
BASICIO
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
Downloadable 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 |