making a light theremin with Arduino

Adapted from the Arduino Projects Book.
  1. For this project, you'll need:
  2. download Arduino

  3. Let's start by downloading and installing Arduino. It's free!
  4. build the circuit

  5. While that's downloading (it won't take very long), start putting your Arduino and Breadboard together. Check out this diagram. Some things to watch out for:
  6. write some code

  7. Alright, let's write some code. Here's what you need to type into your Arduino sketch. When you're done, save it.
  8. verify, compile, and transfer your code

  9. Plug the USB cable into your microcontroller and then into the computer.
  10. Hit the Upload button. That's the arrow at the top of the Arduino screen window (just below Edit).
  11. Did you get an error? That's okay! Click on Copy error to clip board, and then paste into a text editor. This error report will list which lines in your code have errors. Look closely and fix accordingly.
  12. Once your code has been verified, click the Upload button again. You'll then see some lights blink for a few seconds on your microcontroller as well as a progress bar at the bottom of your Arduino window move toward the right. That tells you it's compiling and transferring the code over to the Arduino.
  13. calibrate your theremin

  14. Once the lights on the microcontroller and the progress bar stop, you'll have five seconds to calibrate your theremin. Move your hands around the photoresistor in the same manner that you'll use to play your theremin. TIP: the photoresistor may be tiny, but it's quite sensitive. Don't limit your hand movements to just a few inches--1-3 feet works like a charm!
  15. play your theremin

  16. It's time to rock out. Go nuts on that thing and annoy the heck out of anyone within earshot.
  17. fine "tune" your theremin

  18. You can adjust aspects of the theremin's sound by changing some of the source code. For instance, change the 500 value pitch variable to 1000 or even 4000. That will give a greater range to your sounds (i.e. the highs will be higher and the lows will be lower). Or change the delay() value to make the tones last longer or shorter.
  19. other things you can do with your theremin

  20. This is a super simple introduction to making a theremin, so really it's just the beginning of stuff you can do with this circuit and code combo. Here are a few additional variations you can try: