Step 10: Program Arduino.

Select the right COM port. My board is a Lilypad ATmega 328.

Here is the code:

const int finger = 8;
const int palm = 5;
const int button = 13;
const int empin = 10;
int buttonstate = 0;
int sensorstate = 0;

void setup() {
  pinMode(button, INPUT);
  pinMode(finger, OUTPUT);
  pinMode(palm, INPUT);
  pinMode(empin, OUTPUT);


void loop() {
  digitalWrite(palm, HIGH);
  buttonstate = digitalRead(button);
  sensorstate = digitalRead(finger);
  if (buttonstate == HIGH){
    if (sensorstate == LOW){
      digitalWrite(empin, HIGH);
    digitalWrite(empin, LOW);

<p>i can't tell if a preschooler helped you make this, or a toddler</p>
<p>i made it and it didn't work</p>
<p>It sucked</p>
How and where do I connect the thread to? I can't cut thread in between right?
<p>Correct, don't cut the thread, or make sure the threads connect!</p>
we are planning to make a way better one in a few days with a whole glove magnet
<p>can u send me the doc file or pdf related to this glove or the one u might have made upto now. if possible give me the info related to this gloves on my email id.</p>
did you guys ever go through with that? sounds interesting
<p>Can i use an arduino uno??</p>
I think this is great but exactly how far can it pick up, and how heavy of objects can it pick up?
what is the whole point of this glove? i dont know what MagnetoGirl is so its a little weard. However, is a cool design with room for improvment im looking forward to seeing improvment posted.
i would like to know how you can make it without an arduino .
What if you crushed a ferrite rod into powder and made a pouch. Then, you lined the tips of each finger with this pouch. And then, you wrapped the magnet wire around the tip of each finger (and hid that also). That might create a less noticeable electromagnet.
You can also ditch the Arduino altogether and have some sort of mechanical or analog solution. For what you are using the Arduino for right now, it is not altogether that necessary. And then, you could power the electromagnet with a 9V battery which would make it much stronger (so long as it doesn't heat up the coil too much). <br /><br />You might be able to use a reed switch and a magnet (electromagnet perhaps?) to turn off your glove as opposed to the Arduino. <br />
A little heat from the coil could add value to the glove during the winter months ;) People who live in certain parts of the country might be looking for anything to help keep them warm right about now - getting to be a superhero would be a side bonus.
Even better idea would be to ditch the &quot;round magnet&quot; idea and go with a flat oval shaped magnet instead, and make it the size of the finger. After all the magnetic force is dictated by the number of turns, the amount of current flowing through, the area and the permeability of the material.

About This Instructable




Bio: An engineer, seamstress, cook, coder, and overall maker. Spent a summer at Instructables; got a degree in E: Neural Engineering at Olin College; made a ... More »
More by SelkeyMoonbeam:Orienteering Using a Thumb Compass How to Pack Hangers How to Make a 3D-Printable CAD Model from MR Scans 
Add instructable to: