![](https://arcbotics.com/wp-content/uploads/2016/10/10.Theremin-500x500.png)
Introduction
A theremin is a musical instrument that is played by holding your hand in front of a sensor. The farther out from the sensor, the higher the tone. Today, we’re going to make Sparki into a theramin, using the ultrasonic range finder as input, and the buzzer as output.
What will you need
- A Sparki.
How It Works
This program makes Sparki into a theremin, using Sparki’s ultrasonic distance sensor to measure the hand distance, and the buzzer to play the tone:
![ardublock_theremin_example_1](https://arcbotics.com/wp-content/uploads/2016/12/Ardublock_Theremin_Example_1-500x143.png)
![](https://arcbotics.com/wp-content/uploads/2015/12/btnDownloadCode29.png)
If you play around a bit with the number which multiplies the sensor readings from the ultrasonic sensor block, and with the duration of the notes, you can get different sounds:
![ardublock_theremin_example_2](https://arcbotics.com/wp-content/uploads/2016/12/Ardublock_Theremin_Example_2-500x154.png)
![](https://arcbotics.com/wp-content/uploads/2015/12/btnDownloadCode29.png)