top of page
1-sewing-background-oksana-kovach.jpg

Controller game design with e-textiles materials

I took the E-Textiles deep dive and was a complete challenge. I never worked with fabrics before and trying to understand how to use conductive fabrics was a little hard to understand. When I started to experiment with the different fabrics and threads I let my imagination run to design a game controller. 

The purpose of this project was to make a controller gift for someone we care about. In my case, I decide to make it for my brother Ezdraz. For the proposal projects brainstorming I choose different simple games like PAC-MAN, THROW THE BOTTLE, and GUACA-MOLE. This last game I played with my brother when we were younger and we had a lot of fun. So I started to figure out how to redesign the game using fabrics and textiles. 

Design sketches

Materials

1.

Copper taffeta fabric

2.

Karl Grimm silver conductive thread

3.

Heat'n'bond fusible interfacing

4.

Muslin fabric

5.

Felt fabric

6.

Dubetina fabric

7.

Foam

8.

Old color sweater 

9.

Non-conductive thread

10.

Velostat

11.

Velcro dots

11.

Embroidery needle

12.

Teensy LC

13.

LEDs

14.

Paper clips

15.

Jumper wires

16.

Cardboard

17.

Soldering iron and welding

18.

Scissors and cutter

19.

Insulating tape

20.

Rice (Hammer filler)

21.

Protoboard

Making the pressure sensors

Making the lights indicators

Game board and console

Game code 

#define INTERVALO_MENSAJE1 300//The time that is going to take to read each random number
unsigned long tiempo_1 = 0;//Initial time
long randomm;// variable for the random number generation.
int square=A0;//Square shape input. We are going to read the pressure sensor.
int banana=A1;//Banana shape input.
int rectangle=A2;//Rectangle shape input.
int circle=A3;//Circle shape input.
int sensorSquare;//Variable in which we are going to assign the sensor values.
int sensorBanana;
int sensorRectangle;
int sensorCircle;
int buzzer=8;//Buzzer pin
int buzzer1=7;//Pancake pin
int ledG=9;//Green led
int ledP=10;//Pink led
int ledY=11;//Yellow led
int ledO=12;//Orange led
void setup(){
  Serial.begin(9600);//Calling serial port
  pinMode(square, INPUT_PULLUP);//Assigning sensor as an input. We are going to read data form that pin.
  pinMode(banana, INPUT_PULLUP);
  pinMode(rectangle, INPUT_PULLUP);
  pinMode(circle, INPUT_PULLUP);
  pinMode(buzzer,OUTPUT);//Assigning our points alarms as outputs.
  pinMode(buzzer1,OUTPUT);
  pinMode(ledG,OUTPUT);//Assigning the LEDs as outputs. The logic of this is that we are going to generate
  pinMode(ledP,OUTPUT);//random numbers and assign each LED to one of them to turn on the LEDs randomly.
  pinMode(ledY,OUTPUT);//that's why are outputs of the programm but inputs in the game mechanics.
  pinMode(ledO,OUTPUT);
  digitalWrite(ledG,LOW);//Each time that we load the code all items are going to be turn off
  digitalWrite(ledP,LOW);
  digitalWrite(ledY,LOW);
  digitalWrite(ledO,LOW);
  digitalWrite(buzzer,LOW);
  digitalWrite(buzzer1,LOW);
  }
  void loop(){
   
    sensorSquare = analogRead(square); // reading each sensor values.
    Serial.println(sensorSquare); //printing the values in the serial port.
    sensorRectangle = analogRead(rectangle);
    Serial.println(sensorRectangle);
    sensorCircle = analogRead(circle);
    Serial.println(sensorCircle);
    sensorBanana = analogRead(banana);
    Serial.println(sensorBanana);
 
    if(millis() > tiempo_1 + INTERVALO_MENSAJE1){//Instead of using delay that makes time issues in our code
        tiempo_1 = millis();// we are going to use millis function.
        //We are going to count each time interval settled to perform an action.
        randomm=random(1,5);//In this case we are generating random numbers each 300 miliseconds.
        if(randomm==1){//Conditional that activates Greenled when a 1 is displayed.
          digitalWrite(ledG,HIGH);
          digitalWrite(ledY,LOW);
          digitalWrite(ledP,LOW);
          digitalWrite(ledO,LOW);
          }
         if(randomm==2){
          digitalWrite(ledG,LOW);
          digitalWrite(ledY,HIGH);
          digitalWrite(ledP,LOW);
          digitalWrite(ledO,LOW);
       
            }
          if(randomm==3){
          digitalWrite(ledG,LOW);
          digitalWrite(ledY,LOW);
          digitalWrite(ledP,HIGH);
          digitalWrite(ledO,LOW);
            }    
           if(randomm==4){
          digitalWrite(ledG,LOW);
          digitalWrite(ledY,LOW);
          digitalWrite(ledP,LOW);
          digitalWrite(ledO,HIGH);
            }  
    //less than 400 are the values readed  when the buttons are pressed
    //This signal behavior is for the four buttons.
    }//Conditional that depending on the range of values is going to activate the buzzer and the vibration
    //motor
   
     if(sensorBanana<400||sensorSquare<400||sensorRectangle<400||sensorCircle<400){
       tone (buzzer1, 789);//Activation of the buzzer
      digitalWrite(buzzer,HIGH);//Activation of the vibration indicator
      delay(200);
      digitalWrite(buzzer,LOW);
      noTone(buzzer1);
     
      Serial.println("mole");//Mole means that you earned 1 point.
      }//If the buttons are not pressed the buzzer and the motor are going to be turned off
  }

Game testing 

Guacamole bro test

Guacamole bro test

Game extra considerations 

Extra features I want to add

ON/OFF switch.

Score counter.

Difficulty/speed control.

Hit out of the time indicator.

Other hammers configurations.

(More inclusive controller)

bottom of page