Difference between revisions of "Buzzer (use with mDesigner)"

From Microduino Wiki
Jump to: navigation, search
(Buzzer - Play Song)
Line 100: Line 100:
 
<br style="clear: left;" />
 
<br style="clear: left;" />
 
</div>
 
</div>
 
=Issues=
 
The Buzzer trinket utilizes a resource called a timer. This can cause issues with analog write (PWM), the IR Receiver, and other functions. Undesired or unintended behavior can occur when this timer resource is being accessed by different things at the same time.
 
  
 
=Blocks=
 
=Blocks=
Line 130: Line 127:
 
This block turns off the Buzzer.
 
This block turns off the Buzzer.
 
::[[File:MDesigner Buzzer Off.png]]
 
::[[File:MDesigner Buzzer Off.png]]
 +
 +
 +
=Issues=
 +
The Buzzer trinket utilizes a resource called a timer. This can cause issues with analog write (PWM), the IR Receiver, and other functions. Undesired or unintended behavior can occur when this timer resource is being accessed by different things at the same time.

Revision as of 17:15, 8 June 2018

The Buzzer is a sound producing trinket which vibrates to produce sounds. Support for this trinket is found in mDesigner.

Compatible Pins

The following pins on the Hub or mCenter+'s Hub support this module:

Hub Digital Pins v2-01.png
Pin Name Compatibility Notes
Pin 0 Yes Not recommended, Pin 0 & 1 used by mDesigner (serial communication).
Pin 1 Yes Not recommended, Pin 0 & 1 used by mDesigner (serial communication).
Pin 2 Yes
Pin 3 Yes
Pin 4 Yes
Pin 5 Yes
Pin 6 Yes
Pin 7 Yes
Pin 8 Yes
Pin 9 Yes
Pin 10 Yes
Pin 11 Yes
Pin 12 Yes
Pin 13 Yes
Pin A0 Yes
Pin A1 Yes
Pin A2 Yes
Pin A3 Yes
Pin A6 Yes
Pin A7 Yes
Pin I2C No


Blocks

Buzzer - Set Frequency

This block sets the Buzzer to produce a sound at the desired frequency (Hz) for the set duration (milliseconds).
If the duration is set to 0, then the Buzzer will continuously be active until a Buzzer - Off block is encountered.

Note: If the duration is set (not 0) this block is holding. Which means the frequency must complete playing before the program goes to the next block in the script.
MDesigner Buzzer Set Frequency.png

Buzzer - Play Note

This block sets the Buzzer to play a note for the set duration (seconds).
If the duration is set to 0, then the Buzzer will continuously be active until a Buzzer - Off block is encountered.

Note: If the duration (seconds) is set (not 0) this block is holding. Which means the note must complete playing before the program goes to the next block in the script.
MDesigner Buzzer Play Note.png

Buzzer - Play Song

This block sets the Buzzer to play a song from the drop down list.

Note: This block is holding. Which means the song must complete playing before the program goes to the next block in the script.
MDesigner Buzzer Play Song.png

Buzzer - Off

This block turns off the Buzzer.

MDesigner Buzzer Off.png


Issues

The Buzzer trinket utilizes a resource called a timer. This can cause issues with analog write (PWM), the IR Receiver, and other functions. Undesired or unintended behavior can occur when this timer resource is being accessed by different things at the same time.