Component: Buzzer (Outputs: General)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category Outputs: General


Image 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.

Examples

Depending on your Buzzer you may need to amplify the signal from the microcontroller using a NPN transistor or N channel FET.


BuzzerWire.jpg

Downloadable macro reference

BuzzerBeep

Switches the buzzer on and off automatically to allow for a series of beeps

Parameters

UINT OnTime
Length of time in ms the buzzer will remain on
UINT OffTime
Length of time in ms the buzzer will remain off
BYTE NumberLoops
Number of times to repeat the sequence. Range 1-255


Return value

This call does not return a value


BuzzerOff

Switch Off the Buzzer

Parameters

This macro has no parameters


Return value

This call does not return a value


BuzzerOn

Switch On the Buzzer

Parameters

This macro has no parameters


Return value

This call does not return a value


BuzzerOnDelay

Switch the Buzzer on for a fixed amount of time

Parameters

UINT Time
Time in milliseconds to keep the buzzer on


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Output Pin

This property is of type Single digital pin and can be referenced with the variable name pin.

Pin used to drive the output to the buzzer

Polarity

This property is of type Fixed list of ints and can be referenced with the variable name Polarity.

Controls the pin state required to switch the buzzer on.

Color

This property is of type Color picker and can be referenced with the variable name Color.

Controls the color of the Buzzer object on the panel.

Buzzer Frequency

This property is of type Unsigned integer and can be referenced with the variable name BuzzFreq.

Frequency of the buzzer in Hz to drive the simulation