haha im so crap at this.
ok so now the only errors i get are buttonpressed and false not declared in this scope. so does that mean i need to define buttonpressed as buttonpin high in the setup?
const int buttonPin = 3;
const int ledPin = 2;
int buttonState = 0;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
buttonState = digitalRead(buttonPin);
if ( (buttonState == HIGH) && (buttonPressed == FALSE) ){
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
} else {
digitalWrite(ledPin, LOW);
}