Project showcase
Arduino Thereminoid

Arduino Thereminoid © CC BY-SA

A pseudo theremin using the HackingSTEM finger sensors.

  • 125 views
  • 0 comments
  • 1 respect

Components and supplies

About this project

This is a kind of musical instrument a bit like a theremin. It uses the finger sensors designed by the HackingSTEM team to controll a piezo buzzer. With one finger you can change the pitch, with the other the volume.

Code

Thereminoid codeArduino
Code for the thereminoid
#include <Volume.h>
Volume vol;

int atlag[] = {0, 0, 0, 0, 0, 0, 0};
int atlagv[] = {0, 0, 0, 0, 0, 0, 0};
int Maxv = 1;
int Max = 1;
int osszeg = 0;
long aver = 0;
int osszegv = 0;
long averv = 0;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
vol.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
int osszeg = 0;
int osszegv = 0;
for (int i=5; i >= 0; i--){
osszeg += atlag[i];  
osszegv += atlagv[i];
atlag[i+1]=atlag[i];
atlagv[i+1]=atlagv[i];
delay(100);
};
atlag[0]=analogRead(A0);
atlagv[0]=analogRead(A3);
osszeg += atlag[0];
osszegv += atlagv[0];
if (atlag[0]>Max) {
  Max=atlag[0];};
if (atlagv[0]>Max) {
  Maxv=atlagv[0];};

int sensorValue = map (osszeg/7,0,Max,50,1000);
int volumeValue = map (osszegv/7,0,Max,120,255);
Serial.print ("ossz: ");
Serial.println (osszeg);
Serial.print ("Max: ");
Serial.println (Max);
Serial.println (sensorValue);
vol.tone(sensorValue,volumeValue);
}

Schematics

Thereminoid circuit
The LEDs are in reality the finger sensors you can find at http://aka.ms/HackingSTEM
Powerful leelo s1uz9oua14

Comments

Similar projects you might like

Unravel Preset Piano Easy Arduino (Even a Ghoul Can Make It)

Project in progress by ExeCuteLi

  • 7,371 views
  • 8 comments
  • 21 respects

Rickroll Box

Project showcase by slagestee

  • 4,974 views
  • 0 comments
  • 14 respects

Piezo Christmas Songs

Project showcase by joshi

  • 16,478 views
  • 18 comments
  • 49 respects

Fingerscan: Music at Your Fingertips

Project showcase by touchmysound

  • 9,379 views
  • 6 comments
  • 29 respects

Charlie Chaser

Project showcase by Patrick Prescott

  • 4,223 views
  • 3 comments
  • 18 respects

Automatic Room Light Controller with Bidirectional Visitor

Project showcase by Amrendra Sahni

  • 2,524 views
  • 2 comments
  • 6 respects
Add projectSign up / Login