Difference between revisions of "Component: Piezo Sounder (Audio Output)"
From Flowcode Help
Jump to navigationJump to search (Replaced content with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:...") Tag: Replaced |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
==Piezo Sounder component== | ==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. | 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 Pack== | ||
+ | |||
+ | BASICIO | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 26: | Line 36: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 113: | Line 129: | ||
|- | |- | ||
| colspan="2" | Pin used to drive the output to the buzzer | | colspan="2" | Pin used to drive the output to the buzzer | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 17:27, 9 November 2022
Author | Matrix TSL |
Version | 1.0 |
Category | Audio Output |
Contents
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 Pack
BASICIO
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.
Downloadable macro reference
![]() |
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 |