Five Finger Switch

The idea behind my switch is that it is a hand, with each finger switching on a different LED when combined with the thumb. The metal bits are meant to go on the tips of the fingers of one hand. The red wire is the thumb, going down to the pinky with the green wire. When you touch your thumb and pointer finger, the red LED comes on, thumb + middle finger = blue LED, etc. A combination of fingers will turn on a combination of LEDs, but the combination must include the thumb.  I got this idea with the hopes of making it into gestural video art. Instead of LEDs, the combination of fingers would turn on different videos, or layer them in different combinations.

five finger_1

five finger_2

video

the code:

void setup(){
pinMode(7,OUTPUT);
pinMode(6,INPUT);
pinMode(9,OUTPUT);
pinMode(8,INPUT);
pinMode(11,OUTPUT);
pinMode(10,INPUT);
pinMode(13,OUTPUT);
pinMode(12\,INPUT);
}

void loop(){

if (digitalRead(6) == HIGH){
digitalWrite(7,HIGH);
}
else {
digitalWrite(7,LOW);
}

if (digitalRead(8) == HIGH){
digitalWrite(9,HIGH);
}
else {
digitalWrite(9,LOW);
}

if (digitalRead(10) == HIGH){
digitalWrite(11,HIGH);
}
else {
digitalWrite(11,LOW);
}

if (digitalRead(12) == HIGH){
digitalWrite(13,HIGH);
}
else {
digitalWrite(13,LOW);
}
}

 

Leave a Reply