Infinity Gauntlet
This Instructable will explain and show the user how to create a homemade infinity gauntlet through the use of led lights, Arduino controller, and other components. The Gauntlet main primary function are LED patterns and audio through the activation of a pushbutton.
Some Guides Soldering, Arduino Coding, and cardboard crafting for Any Confusions:
Supplies
Computer for coding
Cardboard box
Exacto Knife
Wire Cutters
Scissors
Gold Acrylic Paint
Prep Your Resistors
Trim 6 68 Ohm resistors for the LED's and 4 17k Ohm Resistors for the breadboard to 1/4 in length using wire cutters.
Attach the Resistors to LED's Using Solder
Using a Soldering iron, Attach the 6 68 ohm Resistors to six different colored LED's. This will prevent the light from burning up during use.
Cut Electric Wire Strips and Attach LED's
Using Wire Cutters, Cut the Black Electrical Wire from the spool 12 5 inch wires and attach one wire to each end of an LED.
Wrap LED's in Electric Tape to Cover Exposed Wire
Cut 12 2 inch strips of electrical tape using scissors and wrap around the exposed wire.
Mark the Resistor Side of the LED
Using a Highlighter, Mark the cut electrical wire attached to the resistor side for all LED's. This will help later in the assembly process.
Attach LED's and Speaker to Glove
Use Hot Glue to attach LED's and Speaker to the back of the glove.
Attach Breadboard and Arduino to the Glove
Peel the back of the breadboard and attach it to the palm. Attach the Arduino to the back of the glove on gold side flap with hot glue.
Wire Breadboard and Ground LED's
Copy the circuit in the first photo which utilizes the 4 trimmed 17k ohm resistors, .4 jumper cables, and 4 push buttons. Cut another 5 inch electrical wire using wire cutters and attach the 5V from the Arduino to the positive side of the breadboard. The electrical wire attached to the non resistor end of the led is wired across the glove over the thumb into the ground on the breadboard.
Wire Breadboard and LED's to Arduino
Wire each of the lights resistor ends to pins 1-6 on the Arduino. Wire the positive speaker side to pin 12 and ground it on the Arduino. Wire each pushbutton to pins 7-10.
Attach Battery Pack to Glove
Attach the battery pack along the space between the pointer finger and thumb to keep it close to the Arduino.
Cut Carboard Pieces and Strips to Cover Exposed Wire
Cut 3 4" long 4" wide pieces of cardboard and 4 6" long 2" pieces of cardboard using the exacto knife.
Combine and Attach Cardboard to Glove
Cut small 0.5" holes for each LED lights on the back of the glove and a one inch by one inch hole for the speaker. Use Hot Glue and Tape to attach the cardboard cutouts onto the glove creating a gauntlet like exterior.
Connect the Arduino Cord and Tape Arduino Cord to Cardboard Underneath
Connect the Arduino cord from the battery pack to the Arduino. Using electrical tape, Tape the Arduino cord to the underside of the cardboard to hide it from view.
Coding the Arduino and Uploading
Copy the code below and upload it to the Arduino from your computer. <p>// variables will change:</p> <p>int buttonState1 = 0; // variable for reading the pushbutton status</p> <p>int buttonState2 = 0;</p> <p>int buttonState3 = 0;</p> <p>int buttonState4 = 0;</p> <p>int buttonState5 = 0;</p> <p> </p> <p>#define NOTE_C4 262</p> <p>#define NOTE_CS4 277</p> <p>#define NOTE_D4 294</p> <p>#define NOTE_DS4 311</p> <p>#define NOTE_E4 330</p> <p>#define NOTE_F4 349</p> <p>#define NOTE_FS4 370</p> <p>#define NOTE_G4 392</p> <p>#define NOTE_GS4 415</p> <p>#define NOTE_A4 440</p> <p>#define NOTE_AS4 466</p> <p>#define NOTE_B4 494</p> <p>#define REST 0</p> <p> </p> <p>// change this to make the song slower or faster</p> <p>int tempo = 140;</p> <p> </p> <p>// change this to whichever pin you want to use</p> <p>int buzzer = 12;</p> <p> </p> <p>int melody[] = {</p> <p> </p> <p> NOTE_D4,16, </p> <p> REST,5, </p> <p> NOTE_D4,16, NOTE_D4,16,NOTE_D4,16,</p> <p> REST,3, </p> <p> NOTE_D4,16, NOTE_D4,16,NOTE_D4,16, NOTE_D4,16, NOTE_DS4 ,16, NOTE_DS4 ,16, NOTE_DS4 ,16, </p> <p> REST,3, </p> <p> NOTE_DS4 ,16, NOTE_DS4 ,16, NOTE_E4,16, </p> <p> REST,3,</p> <p> NOTE_E4,16, NOTE_E4,16, NOTE_E4,16, NOTE_E4,16, NOTE_F4,16, NOTE_F4,16, NOTE_F4,16,</p> <p> REST,3, </p> <p> NOTE_F4,16, NOTE_F4,16, NOTE_E4,16,</p> <p> REST,3, </p> <p> NOTE_E4,16, NOTE_E4,16, NOTE_E4,16, NOTE_E4,16, NOTE_DS4 ,16, NOTE_DS4 ,16, NOTE_DS4 ,16,</p> <p> REST,3,</p> <p> NOTE_DS4 ,16, NOTE_DS4 ,16, </p> <p> REST,4, </p> <p> NOTE_C4,16, </p> <p> REST,3,</p> <p> NOTE_D4,16, NOTE_D4,16, NOTE_D4,16, </p> <p> REST,3, </p> <p> NOTE_D4,16, NOTE_D4,16, NOTE_D4,16, REST,4, NOTE_D4,16, NOTE_D4,16,NOTE_D4,16, NOTE_D4,16, NOTE_DS4 ,16, NOTE_DS4 ,16, NOTE_DS4 ,16,</p> <p> REST,3,</p> <p> NOTE_DS4 ,16, NOTE_DS4 ,16, NOTE_E4,16,</p> <p> REST,3, </p> <p> NOTE_E4,16, NOTE_E4,16, NOTE_E4,16, NOTE_E4,16, NOTE_F4,16,NOTE_F4,16,NOTE_F4,16,</p> <p> REST,3, </p> <p> NOTE_F4,16, NOTE_F4,16, NOTE_E4,16,</p> <p> REST,3, </p> <p> NOTE_E4,16,NOTE_E4,16,NOTE_E4,16,NOTE_E4,16, NOTE_DS4 ,16, NOTE_DS4 ,16, NOTE_DS4 ,16,</p> <p> REST,3, </p> <p> NOTE_DS4 ,16, NOTE_DS4 ,16, </p> <p> REST,4, </p> <p> NOTE_C4,16,</p> <p>};</p> <p> </p> <p>// sizeof gives the number of bytes, each int value is composed of two bytes (16 bits)</p> <p>// there are two values per note (pitch and duration), so for each note there are four bytes</p> <p>int notes = sizeof(melody) / sizeof(melody[0]) / 2;</p> <p> </p> <p>// this calculates the duration of a whole note in ms</p> <p>int wholenote = (60000 * 4) / tempo;</p> <p> </p> <p>int divider = 0, noteDuration = 0;</p> <p> </p> <p> </p> <p>void setup() {</p> <p> // iterate over the notes of the melody.</p> <p> // the array is twice the number of notes (notes + durations)</p> <p> </p> <p> </p> <p> </p> <p> </p> <p> // put your setup code here, to run once:</p> <p> // initialize the LED pins as an output:</p> <p> pinMode(1, OUTPUT);</p> <p> pinMode(2, OUTPUT);</p> <p> pinMode(3, OUTPUT);</p> <p> pinMode(4, OUTPUT);</p> <p> pinMode(5, OUTPUT);</p> <p> pinMode(6, OUTPUT);</p> <p> </p> <p> // initialize the pushbutton pins as an input:</p> <p> pinMode(7, INPUT);</p> <p> pinMode(8, INPUT);</p> <p> pinMode(9, INPUT);</p> <p> pinMode(10, INPUT);</p> <p>// pinMode(11, INPUT);</p> <p>}</p> <p> </p> <p>void loop() {</p> <p> // put your main code here, to run repeatedly:</p> <p> // read the state of the pushbutton value:</p> <p> buttonState1 = digitalRead(7);</p> <p> buttonState2 = digitalRead(8);</p> <p> buttonState3 = digitalRead(9);</p> <p> buttonState4 = digitalRead(10);</p> <p>// buttonState5 = digitalRead(11);</p> <p> //Serial.print(buttonState);</p> <p> </p> <p> // check if the pushbutton is pressed. If it is, the buttonState is HIGH:</p> <p> if (buttonState1 != LOW) { //button 1</p> <p> // turn LED on:</p> <p> for (int i = 1; i <= 6; i++) {</p> <p> digitalWrite(i, HIGH);</p> <p> delay(500);</p> <p> }</p> <p> for (int i = 1; i <= 6; i++) {</p> <p> digitalWrite(i, LOW);</p> <p> delay(500);</p> <p> }</p> <p> }</p> <p> if (buttonState2 != LOW) { //button 2</p> <p> // turn LED on:</p> <p> for (int i = 1; i <=6; i++) {</p> <p> digitalWrite(i, HIGH);</p> <p> }</p> <p> for (int thisNote = 0; thisNote < notes * 2; thisNote = thisNote + 2) {</p> <p> </p> <p> // calculates the duration of each note</p> <p> divider = melody[thisNote + 1];</p> <p> if (divider > 0) {</p> <p> // regular note, just proceed</p> <p> noteDuration = (wholenote) / divider;</p> <p> } else if (divider < 0) {</p> <p> // dotted notes are represented with negative durations!!</p> <p> noteDuration = (wholenote) / abs(divider);</p> <p> noteDuration *= 1.5; // increases the duration in half for dotted notes</p> <p> }</p> <p> </p> <p> // we only play the note for 90% of the duration, leaving 10% as a pause</p> <p> tone(buzzer, melody[thisNote], noteDuration * 0.9);</p> <p> </p> <p> // Wait for the specief duration before playing the next note.</p> <p> delay(noteDuration);</p> <p> </p> <p> // stop the waveform generation before the next note.</p> <p> noTone(buzzer);</p> <p> }</p> <p> }</p> <p> if (buttonState3 != LOW) { //button 3</p> <p> // turn LED on:</p> <p> for (int i = 0; i <=5; i++) {</p> <p> digitalWrite(2, LOW);</p> <p> digitalWrite(4, LOW); </p> <p> digitalWrite(1, HIGH);</p> <p> digitalWrite(3, HIGH);</p> <p> delay(250);</p> <p> digitalWrite(1, LOW);</p> <p> digitalWrite(3, LOW);</p> <p> digitalWrite(2, HIGH);</p> <p> digitalWrite(4, HIGH);</p> <p> delay(250);</p> <p> }</p> <p> }</p> <p> if (buttonState4 != LOW) { //button 4</p> <p> // turn LED on:</p> <p> for (int i = 0; i <=5; i++) {</p> <p> for (int i = 1; i <=6; i++) {</p> <p> digitalWrite(i, HIGH);</p> <p> }</p> <p> delay(250);</p> <p> for (int i = 1; i <=6; i++) {</p> <p> digitalWrite(i, LOW);</p> <p> }</p> <p> delay(250);</p> <p> }</p> <p> } </p> <p> </p> <p> for (int i = 1; i <=6; i++) {</p> <p> digitalWrite(i, LOW);</p> <p> }</p> <p> </p> <p>}</p> <p> </p>
Paint the Gauntlet
Use the Gold Acrylic Paint to coat all of the cardboard and tape to more resemble an infinity gauntlet.