Home Code Esplora buzzer example

Esplora buzzer example

by shedboy71

Another example for the Arduino Esplora, we will read the value from the slider and play a tone based on that from the buzzer. You can see the location of these parts in the picture of the Esplora underneath

This will probably be the shortest example you ever use on an Arduino

esplora

esplora

Code

[cpp]

#include <Esplora.h>

void setup()
{
}

void loop()
{
// read the slider value
int slider = Esplora.readSlider();
// play the note corresponding to the slider's position:
Esplora.tone(slider);
}

[/cpp]

 

Links


Esplora Joystick + Sensor + LED Module Kit Board for Arduino – Deep Blue – $62.13

Share

You may also like