Theremin
The Theremin is an electronic musical instrument controlled without physical contact. The name comes from its inventor, Léon Theremin, who patented the device in 1928.
In this tutorial you will make a simplified version of the Theremin using the Franzininho DIY.
Required Materials
- Franzininho DIY
- 2 LDR 10K
- BC548
- 330 R resistor
- 8 ohm speaker
Circuit

Code
The following code reads the analog input value and acts on the speaker output:
/*
* Theremin Franzininho
* Author: Fábio Souza
* Date: 10/09/2018
*/
int speaker = 0; // speaker output pin
int sensor = 1;
void setup()
{
pinMode(speaker, OUTPUT);
}
// Theremin
void loop()
{
digitalWrite(speaker, HIGH);
delayMicroseconds(analogRead(sensor) << 2);
digitalWrite(speaker, LOW);
delayMicroseconds(analogRead(sensor) << 2);
}