This instructable will allow you to make a theremin controlled by the distance you are from the sensor. Using the Bluefruit LE, you will be able to control the musical scale used, and turn the sound on and off.
Here is a link showing how the theremin is used.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts Needed
For this project, you will need:
-An Arduino UNO(or a similar board)
-Bluefruit LE nRF8001 Breakout
-HC-SR04 Ultrasonic Sensor
-An Android phone or iPhone
Step 2: Wiring
Using wires, connect:
1. SR04 GND pin to Arduino GND
2. SR04 ECHO pin to Arduino Digital 6
3. SR04 TRIG pin to Arduino Digital 7
4. SR04 VCC pin to D2
1. Positive side of buzzer to Arduino Digital 8
2. Negative side of buzzer to Arduino GND
Bluefruit LE nRF8001
1. Bluefruit LE VIN to Arduino 5V
2. Bluefruit LE GND to Arduino GND
3. Bluefruit LE RST to Arduino Digital 9
4. Bluefruit LE RDY to Arduino Digital 2
5. Bluefruit LE REQ to Arduino Digital 10
6. Bluefruit LE MOSI to Arduino Digital 11
7. Bluefruit LE MISO to Arduino Digital 12
8. Bluefruit LE SCK to Arduino Digital 13
Step 3: Code and Phone App
To set up the Bluefruit nRF8001 and HC-SR04, you need to download the libraries for each one. Adafruit has a tutorial on setting up their board and connecting to a smartphone here, and the setup for the sensor is shown in this instructable.
Alternate link for NewPing: https://forum.arduino.cc/index.php?topic=106043.0#/?
Once you have made sure that everything is working properly, you can then download the code for the theremin from my Github. After connecting to the phone, you will be able to use both the chromatic scale and D minor pentatonic scale.
By typing in chrom, you will activate the chromatic scale, and by typing in penta, you will activate the pentatonic scale.
Of course, you can create your own settings using the note library included in the code, or modify it in any way you choose. Have fun!