LED Knuckle Glove using miniaturized Arduino LilyPad [Ozzy Osbourne Knuckle Tattoo Wanna Be]
Here my first go at an Arduino textile project. It turned out to be pretty easy.
And I’d like to think that think Ozzy Osbourne would like it…
What You Need:
- TinyLily Processor Board
- TinyLily Power Adapter
- TinyLily MiniUSB Adapter (for programming the TinyLily)
- (4) LED Circuit Boards (1206 type is what I used)
- Lithium Polymer Rechargeable Battery
- Conductive Thread
- Sewing Needle
- Mirco USB cable (same kind you would use with most android cell phones)
- Glove – cotton would be best
- Ripe Avocado
Circuit Setup:
I know – not very technical! But hey – it’s the best way I felt I could communicate the layout.
All the lines in diagram indicate the conductive thread connections. The two white circles on the thumb and pointer finger, are where you create “pads” by making multiple passes of the conductive thread. The ovals on the knuckles are the LED circuit boards.
Code:
/* LED Knuckle Glove (Ozzy Ozbourne wanna be) Circuit: [right hand configuration] TinyLily as processor - conductive thread as connective wire Pin 0 > TinyCiruits LED circiut board at PINKY finger > GND Pin 1 > TinyCiruits LED circiut board at INDEX finger > GND Pin 2 > TinyCiruits LED circiut board at MIDDLE finger > GND Pin 3 > TinyCiruits LED circiut board at POINTER finger > GND Pin A5 > conductive thread up the side and a "pad" stichted to the left side of the pointer finger knuckle GND > conductive thread up the side of the THUMB and a "pad" stichted on the thumb. also connected to all finger LEDs as indicated above and Also MODEs Mode 0 = LEDs back and forth in sequence Mode 1 = all LEDs blink Mode 2 = LEDs on Solid Created SEPT 2014 by Michael JamesHomeThis code is in the public domain */ //Control Variables //when the thumb touches the trigger, the glove enters and increments the different Modes int LED_Trigger_Pin = A5; int Mode = 0; //determines which mode the LEDs flash in //MODE 0 Variables int timer = 50; // The higher the number, the slower the timing. void setup() { //set an internal pullup resistor on the trigger pinMode(LED_Trigger_Pin, INPUT_PULLUP); // use a for loop to initialize each pin as an output: for (int thisPin = 0; thisPin < 4; thisPin++) { pinMode(thisPin, OUTPUT); } } void loop() { //////////////////////MODE 0//////////////////////////////////// // LEDs illuminate back and forth in sequence ///////////////// //Check the mode if(Mode == 0){ //continue while trigger is pressed while( digitalRead(A5) == LOW ){ // loop from the lowest pin to the highest: for (int thisPin = 0; thisPin < 4; thisPin++) { // turn the pin ON digitalWrite(thisPin, HIGH); delay(timer); // turn the pin OFF digitalWrite(thisPin, LOW); }//close for // loop from the highest pin to the lowest: for (int thisPin = 3; thisPin >= 0; thisPin--) { // turn the pin ON digitalWrite(thisPin, HIGH); delay(timer); // turn the pin OFF digitalWrite(thisPin, LOW); }//close for }//close while //increment the mode Mode++; //spece between next trigger delay(500); }//close if //////////////////////MODE 1//////////////////////////////////// //// All LEDs Blink /////////////////////////////////////////// //Check the Mode if(Mode == 1){ //continue while trigger is pressed while( digitalRead(A5) == LOW ){ //Turn all LEDs on // loop from the lowest pin to the highest: for (int thisPin = 0; thisPin < 4; thisPin++) { // turn the pin on digitalWrite(thisPin, HIGH); }//close for //delay to see the LEDs ON delay(500); //turn off all LEDs for (int thisPin = 0; thisPin < 4; thisPin++) { //turn the pin OFF digitalWrite(thisPin, LOW); }//close for //delay to see the LEDs OFF delay(500); }//close while //increment the mode Mode++; //spece between next trigger delay(500); }//close if //////////////////////MODE 2//////////////////////////////////// //// Turn ALL LEDs On ///////////////////////////////////////// //Check the Mode if(Mode == 2){ //continue while trigger is pressed while( digitalRead(A5) == LOW ){ //Turn all LEDs on loop from the lowest pin to the highest: for (int thisPin = 0; thisPin < 4; thisPin++) { // turn the pin ON digitalWrite(thisPin, HIGH); }//close for }//close while //Turn off all LEDs after trigger is released for (int thisPin = 0; thisPin < 4; thisPin++) { //turn the pin OFF digitalWrite(thisPin, LOW); }//Close for //Increment the mode Mode++; //Delay to debounce trigger presses delay(500); }//close if ///////////////////////////////////////////////////////////// ///////////////// RESET Phase //////////////////////////////// //if the mode is greater than 2, then start the mode back at 0 if(Mode > 2){ Mode = 0; }//close if }//close loop
If you make one, let me know how it goes!
[…] Our friends over at the Open Source Hardware Group put together this great project of a making an LED knuckle glove using the TinyLily. They also have a number of tutorials on using the Arduino platform that is definitely worth checking out, learn more about it here. […]
[…] https://www.programmingelectronics.com/led-knuckle-glove-using-miniaturized-arduino-lilypad-ozzy-osbourn… […]