1.4K
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
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