The code is on the tutorial page - it sounds like a hardware fault - perhaps the switch isn't pushed fully into the breadboard (those little pushbuttons don't sit very well in breadboards).
u can see code on the link, I checked hardware with continuity test everything works fine (did it about 4 times ) How cab i check inputs with usual multimeter?
this is the code:
/*
Switch and LED test program
*/
int ledPin = 12; // LED is connected to pin 12
int switchPin = 2; // switch is connected to pin 2
int val; // variable for reading the pin status
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as output
pinMode(switchPin, INPUT); // Set the switch pin as input
}
void loop(){
val = digitalRead(switchPin); // read input value and store it in val
if (val == LOW) { // check if the button is pressed
digitalWrite(ledPin, HIGH); // turn LED on
}
if (val == HIGH) { // check if the button is not pressed
digitalWrite(ledPin, LOW); // turn LED off
}
}
U can see it on the link, I am using arduino serial made by myself with atmega8, OS Windows
You can check the Digital pins on the Arduino by doing a digitalWrite(pin, HIGH) and then placing the MM on the pin and ground and see if it is outputting 5V. Then swap it to LOW and make sure your getting 0V.