Hello today I bought a starter kit for arduino UNO and I'm trying to check if a button is pressed and if it is the turn on a LED that is on the other side of the breadboard ,but I get a "expected constructor, destructor, or type conversion before '}' token" here is my code:
int pushButton = 2;
int LED = 4;
void setup() {
Serial.begin(9600);
pinMode(pushButton, INPUT);
pinMode(LED, OUTPUT);
}
void loop() {
int buttonState = digitalRead(pushButton);
Serial.println(buttonState);
if(buttonState = 1){
digitalWrite(LED, HIGH);
}else{
digitalWrite(LED, LOW);
}
}
delay(100);
}