Only your Arduino Espora is needed for this example.
Only your Arduino Esplora is needed for this example. Connect the Esplora to your computer with a USB cable.
This example explain you how to play notes on the buzzer mounted on the Arduino Esplora. Buzzers can generate different audio signals in all the udible frequencies range. Notes are audio signals at a specific frequency, knowing the frequency of the notes you need, you can start to compose your melody.
This example shows how to play notes on the buzzer mounted on the Arduino Esplora. Buzzers can generate different audio signals in audible frequency ranges. A note is an audio signal at a specific frequency. If you know the frequency of the notes you want to play, you can start to compose a melody.
In this example, you move the slider to generate different notes, and play them by pressing the down push-button.
Moving the slider on the Esplora you can generate different notes, that you can play by pressing the direction down push-button. There are 13 notes stored inside an array and inside the example you can select it by changing the position of the slider. The index to select inside the array which note play is mapped on the position of the linear potentiometer. Imagine to split up the lenght of the potentiometer in 13 sectors, moving the slider from the right to the left will change the note when it cross a different sector.
To play the note you have to press the down direction push-button, holding it you choose the note duration.
There are 13 notes stored inside an array. You can choose the note to play by changing the position of the slider.
The index number that selects the value in the array is mapped to the position of the linear potentiometer. This number is the frequency of the note to play. Imagine the length of the potentiometer in split into 13 sections. Moving the slider from the right to the left will change the note when it crosses into a different section. Each section corresponds to a spot in the array, and a value to play on the buzzer.
To play the note you press the down direction button; it will play as long as the button is held.