I'm trying to take input from a pin my code is
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
char inpin8 = 8;
pinMode (inpin8, INPUT_PULLUP);
int buttonState = 0;
byte cursor[8] = {
B10000,
B01000,
B00100,
B00010,
B00100,
B01000,
B10000,
};
void setup() {
// set up the LCD's number of columns and rows:
lcd.clear();
lcd.begin(16, 2);
lcd.print("Booting");
delay(5000);
lcd.clear();
lcd.createChar(0, cursor);
lcd.begin(16, 2);
lcd.write(byte(0));
}
void loop() {
buttonState = digitalRead(inpin8);
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if(buttonState = 1) {
} else {
}
delay(5);
}
but every time I try to upload it to my Arduino it gives me this error
/tmp/044310553/UNOS/UNOS.ino:8:9: error: expected constructor, destructor, or type conversion before '(' token
exit status 1
can someone show me what I did wrong