Pull up/down resistors, how to wire a button?

I cannot understand how those types of resistors work, what is their purpose and s*@t. Can somebody give me a complete course about them for dummies? >:( I understood how to wire a button using the externall pull downs, BUT HOW THE HELL DO I WIRE A BUTTON USING THE INTERNAL PULL UPS >:( here's my code:

define OutLedPin 13

define Button 7

int SwitchStatus = 0;

void setup() { pinMode(Button, INPUT); digitalWrite(Button, HIGH); pinMode(OutLedPin, OUTPUT);

}

void loop() { SwitchStatus == digitalRead(Button); if(SwitchStatus == HIGH) { digitalWrite(OutLedPin, HIGH); } else { digitalWrite(OutLedPin, LOW); }

}

I wire one of the pins of the button to the GND pin of the Arduino and the 7th pin Input to the other pin of the button :-[ :-[ :-[

BUT HOW THE HELL DO I WIRE A BUTTON USING THE INTERNAL PULL UPS

You answered your own question

I wire one of the pins of the button to the GND pin of the Arduino and the 7th pin Input to the other pin of the button

If the button is not pressed the input pin gets current through the resistor and so reads high. When the button is pressed the current is diverted to ground through the button and so it does not go into the input pin and so it reads low.

The resistor "pulls up" the input to a logic one and the buton shorts this out to a logic zero.

check this out...

http://www.ladyada.net/learn/arduino/lesson5.html

cheers, Pracas