Component: Piezo Sounder (Audio Output)

From Flowcode Help
Revision as of 11:11, 17 November 2021 by Wiki bot (talk | contribs) (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:...")
Jump to navigationJump to search
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.

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. FC6 Icon.png 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.


BuzzerWire.jpg

Downloadable macro reference

Fc9-comp-macro.png BuzzerBeep
Switches the buzzer on and off automatically to allow for a series of beeps 
Fc9-u16-icon.png - UINT OnTime
Length of time in ms the buzzer will remain on 
Fc9-u16-icon.png - UINT OffTime
Length of time in ms the buzzer will remain off 
Fc9-u8-icon.png - BYTE NumberLoops
Number of times to repeat the sequence. Range 1-255 
Fc9-u16-icon.png - UINT Frequency
frequency in hz to output to the Piezo sounder 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png BuzzerOnDelay
Switch the Buzzer on for a fixed amount of time 
Fc9-u16-icon.png - UINT Time
Time in milliseconds to keep the buzzer on 
Fc9-u16-icon.png - UINT Frequency
Frequency to output in Hz 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-5-icon.png Output Pin
Pin used to drive the output to the buzzer 
Fc9-type-1-icon.png Color
Controls the color of the Buzzer object on the panel. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations