Difference between revisions of "Itty Bitty Buggy: Buzzer Tutorial (mDesigner)"
(→Example 2: Play a note, pause, play another note, pause, repeat) |
(→Block: Play Song) |
||
Line 91: | Line 91: | ||
=Block: Play Song= | =Block: Play Song= | ||
+ | Buzzer can be controlled to play a note with the '''Buzzer - Play Note''' block. | ||
+ | {| class="wikitable" | ||
+ | | | ||
+ | '''Function:''' This block controls the Buzzer to play the selected song. | ||
+ | {| class="wikitable" style="background-color:#FF0000; color:#FFFFFF" | ||
+ | |'''Note:''' This block's behavior is '''DIFFERENT''' between online and offline mode! See [[Itty_Bitty_Buggy:_Buzzer_Tutorial_(mDesigner)#Block:_Play_Song|Buzzer - Play Song block Tutorial]]. | ||
+ | |} | ||
+ | {| class="wikitable" style="background-color:#FEF9E7;" | ||
+ | |'''Note:''' As of mDesigner v1.6: | ||
+ | *In "online mode" this block is holding. Which means the song must complete playing before the program goes to the next block in the script. | ||
+ | *In "offline mode" this block must be constantly called in order to play each note of the song. A '''Forever''' or '''Repeat''' block should be used. | ||
+ | |} | ||
+ | :[[File:IBB mDesigner Buzzer Block Play Song.png]] | ||
+ | |||
+ | :*'''Song''' - selected song to play. | ||
+ | |} |
Revision as of 23:04, 1 November 2018
Contents
Buzzer
Buggy Base contains a Buzzer capable of producing sounds. When pulses of electricity are sent to the Buzzer, the pulses causes the Buzzer to vibrate and produce an audible sound. Pulses of different frequencies will cause the Buzzer to produce different notes. The following blocks will allow the user to control the Buzzer.
Block: Play Note
Buzzer can be controlled to play a note with the Buzzer - Play Note block.
Function: This block controls the Buzzer to play the selected note for the specified duration.
|
Example 1: Play a note with Buzzer
Note: this example can be performed in online or offline mode. If you plan to use online mode and previously used offline mode, please follow the instructions to reset back to "online mode". |
|
|
Description: When activated, Buzzer will play note C4 for 3 seconds.
Example 2: Play a note, pause, play another note, pause, repeat
Note: this example can be performed in online or offline mode. If you plan to use online mode and previously used offline mode, please follow the instructions to reset back to "online mode". |
|
|
Description: When activated, Buzzer repeatedly play note C4 (1 second), pause (1 second), play note D4 (1 second), pause (1 second).
Block: Play Song
Buzzer can be controlled to play a note with the Buzzer - Play Note block.
Function: This block controls the Buzzer to play the selected song.
|