Naruto Hand Seal Controller Glove

by thedutchknot in Circuits > Arduino

155 Views, 1 Favorites, 0 Comments

Naruto Hand Seal Controller Glove

FR9C0DILHKKL45G.jpg
Naruto Hand Seal Controller | DEMO

As a fan of the Naruto universe and having seen the games that have been developed for it, I thaught it would be a great niece to create a controller for that can track which hand seals are beeing formed and use those as inputs instead of quick time events and other button mashing mechanics. This project was a prototype to check the reality of the idea.

Supplies

Tools:

  • Soldering Iron
  • Glue Gun

Supplies:

Setting Up!

20230513_113604.jpg

For the first step we are poking our five LDRs through the glove so that the sensor is facing out on the inside of the hand, and the two prongs are stuck inside the fingers. You can bend them in an L shape so they stay in place better for the next part of this step.

Turning the glove inside out, we will now have a clear view of our LDRs on the inside of the glove.

Additionally you may also want to glue the LDRs on the outside of the glove in place by applying the glue in between the LDRs and the glove as shown in the picture.

Soldering 1/2!

20230504_213300.jpg
rn_image_picker_lib_temp_67d1b167-9a03-4f08-9b4c-6073ce8b53e8.jpg
Layout.PNG

For the second step we start soldering. Take for each LDR three cables and one resistor and solder them to eachother like shown in the attached files for this step.

At this stage it might be useful to tape the corresponding cables togheter so you do not get them intertwined.

If you have a glove like the one I used, you will have an inner glove. Poke a hole through the outer glove, run your cables through the Inner glove out of the hole you just made in the outer glove and now if you where to wear the glove you will not be touching the cables with your hand since they are in between the inner glove and outer.

Now that all the cables are bunched up solder all the positive ends to one cable aswell as the negative ends to another cable. You should end up with something similair to the picture attached to this step.

Additionally any loose components should be stuck to the inside of the glove using your glue gun as to stick them in place and protect them from breaking.

Housing!

20230513_121258.jpg
20230513_121310.jpg

Now that you have all your cables coming through the outside of the glove it is time to attach your arduino and powersupply to the glove. In my instance I was obligated to make a dedicated housing for the arduino and powersupply so I used some lego bricks to stick at all neatly togheter. However glueing the Arduino and Powersupply to the palm of the hand will suffice aswell. I inspire you to be creative with this step!

Soldering 2/2!

fpekfiew.PNG

Now that our controller inputs are all soldered, we also need to have a feedback mechanism to tell the wearer when certain actions have been recognized by the glove. We will use an LED for this. The soldering for this LED is almost identical to the LDRs. The attached blueprint to this step will show you exactly how to solder it togheter.

Make sure to attach this LED to the outside palm of the glove in whichever way fits your housing. Again a glue gun can as easily be used aswell.

Code!

20230513_120951.jpg
20230513_120953.jpg
20230513_120951.jpg
20230513_121000.jpg

For this step the following code suffices. Keep in mind to plug the cables into the right ports. If you wish to use other ports make sure to adjust the code accordingly.

This specific code has a built in sequence of four hand seals that when made in that sequence triggers the light to stay lit. Each seal will indicate its completion by a quick flash of the red LED. To reset the sequence at any point open all fingers.


If you have completed this step you should be all set to try out your new Naruto Hand Seal Controller!!!


int Sensor1_Threshold; //Sensor Finger One
int Sensor2_Threshold; //Sensor Finger Two
int Sensor3_Threshold; //Sensor Finger Three
int Sensor4_Threshold; //Sensor Finger Four
int Sensor5_Threshold; //Sensor Finger Five


int One; //Calabrated Darkness Threshold Finger One
int Two; //Calabrated Darkness Threshold Finger Two
int Three; //Calabrated Darkness Threshold Finger Three
int Four; //Calabrated Darkness Threshold Finger Four
int Five; //Calabrated Darkness Threshold Finger Five


enum states { //Declare States to StateMachine
  SealOne,
  SealTwo,
  SealThree,
  SealFour,
  SealFinished
};


states state;


void SealOneCheck(){
  if (Sensor1_Threshold > One && Sensor2_Threshold > Two && Sensor3_Threshold > Three && Sensor4_Threshold > Four && Sensor5_Threshold > Five){
    digitalWrite(8,HIGH);
    state = SealTwo;
  } else{
    digitalWrite(8,LOW);
  }


  if (Sensor1_Threshold <= One && Sensor2_Threshold <= Two && Sensor3_Threshold <= Three && Sensor4_Threshold <= Four && Sensor5_Threshold <= Five){
    state = SealOne;
  }
}


void SealTwoCheck(){
    if (Sensor1_Threshold <= One && Sensor2_Threshold > Two && Sensor3_Threshold > Three && Sensor4_Threshold > Four && Sensor5_Threshold <= Five){
    digitalWrite(8,HIGH);
    state = SealThree;
  } else{
    digitalWrite(8,LOW);
  }


  if (Sensor1_Threshold <= One && Sensor2_Threshold <= Two && Sensor3_Threshold <= Three && Sensor4_Threshold <= Four && Sensor5_Threshold <= Five){
    state = SealOne;
  }
}


void SealThreeCheck(){
  if (Sensor1_Threshold > One && Sensor2_Threshold > Two && Sensor3_Threshold > Three && Sensor4_Threshold > Four && Sensor5_Threshold > Five){
    digitalWrite(8,HIGH);
    state = SealFour;
  } else{
    digitalWrite(8,LOW);
  }


  if (Sensor1_Threshold <= One && Sensor2_Threshold <= Two && Sensor3_Threshold <= Three && Sensor4_Threshold <= Four && Sensor5_Threshold <= Five){
    state = SealOne;
  }
}


void SealFourCheck(){
  if (Sensor1_Threshold > One && Sensor2_Threshold > Two && Sensor3_Threshold <= Three && Sensor4_Threshold > Four && Sensor5_Threshold > Five){
    digitalWrite(8,HIGH);
    state = SealFinished;
  } else{
    digitalWrite(8,LOW);
  }


  if (Sensor1_Threshold <= One && Sensor2_Threshold <= Two && Sensor3_Threshold <= Three && Sensor4_Threshold <= Four && Sensor5_Threshold <= Five){
    state = SealOne;
  }
}


void SealFinishedCheck(){
  if (Sensor1_Threshold <= One && Sensor2_Threshold <= Two && Sensor3_Threshold <= Three && Sensor4_Threshold <= Four && Sensor5_Threshold <= Five){
    state = SealOne;
  }
  digitalWrite(8,HIGH);
}


void setup() {
  Serial.begin (9600);


  pinMode(8, OUTPUT); // LightLED


  pinMode (A1, INPUT); //Finger One Input
  pinMode (A2, INPUT); //Finger Two Input
  pinMode (A3, INPUT); //Finger Three Input
  pinMode (A4, INPUT); //Finger Four Input
  pinMode (A5, INPUT); //Finger Five Input


  //Light calibration | Checks for current light levels
  Sensor1_Threshold = analogRead(A1); //Declare Finger Input to int
  Sensor2_Threshold = analogRead(A2); //Declare Finger Input to int
  Sensor3_Threshold = analogRead(A3); //Declare Finger Input to int
  Sensor4_Threshold = analogRead(A4); //Declare Finger Input to int
  Sensor5_Threshold = analogRead(A5); //Declare Finger Input to int


  One = Sensor1_Threshold;
  Two = Sensor2_Threshold;
  Three = Sensor3_Threshold;
  Four = Sensor4_Threshold;
  Five = Sensor5_Threshold;


  //Set StateMachine to Beginning
  state = SealOne;
  digitalWrite(8,HIGH);
}


void loop() {
  Sensor1_Threshold = analogRead(A1); //Declare Finger Input to int
  Sensor2_Threshold = analogRead(A2); //Declare Finger Input to int
  Sensor3_Threshold = analogRead(A3); //Declare Finger Input to int
  Sensor4_Threshold = analogRead(A4); //Declare Finger Input to int
  Sensor5_Threshold = analogRead(A5); //Declare Finger Input to int


  switch (state){
    case SealOne:
      SealOneCheck();
      break;
    case SealTwo:
      SealTwoCheck();
      break;
    case SealThree:
      SealThreeCheck();
      break;
    case SealFour:
      SealFourCheck();
      break;
    case SealFinished:
      SealFinishedCheck();
      break;
  }
}

Conclusion

When I first started out designing this system I had a two handed method in mind. However rapid prototyping showed me that using two hands would be biting off more than I could chew for my first time working with arduino. It wasn't that tough getting used to the different coding format, though electrical engineering scared me quite a bit, still I learned a bunch on that front!