A buzzer is a piezoelectric audio signaling device. A piezo electric buzzer can be driven by any small DC voltage to generate audio tone. A click, beep, or ring can indicate that a buzzer is sounding.

Piezoelectric effect is the ability of certain materials to generate an electric charge in response to applied mechanical stress. Meaning of Piezo is push. If certain electric charge is given to piezoelectric material, then it vibrates according to the charge given causing some sound to generate.In this we are using buzzer for generation of different tones.

  • Goto mblock software and open it. Goto edit menu and select Arduino mode.

  • Playme Robot Program is a Header file for Robot programming.
  • It makes programming simple. By using this we can access all blocks easily and smoothly.
  • If we are not using this then it may give us errors in program.
  • So put this at start of program.

  • Here we are using loop. Loop is area which will be repeated for certain times depending upon its type.
  • If we write anything inside loop then it will be repeated along with loop.
  • Here we are using repeat loop which will run program for certain number of time.
  • Here we are using repeat 10 times which will run program for 10 times.
  • Now select Tone sound note block which can be used to generate different sounds with buzzer.
  • Drag that block and put it here inside repeat loop.

 

  • Now select note for tone generation. We can select tones just drag down that arrow and we can see different options.

  • Similarly we can select beat whether it is Half,whole etc.

  • Now drag tone block again and select different tone this time.

 

  • Similarly do this procedure until you are not getting your composed tone.

 

  • Now save program.

  • Give name to program.

 

  • Select COM port

 

  • Click on Upload Arduino option.

 

 

  • Thats it, you can see (or hear ) the output of your program