I’m having an error that I don’t know how to fix. It tells me that LCD is not declared but I included the library.
#include <LiquidCrystal.h>
const int buttonPin1 = 2;
const int buttonPin2 = 3;
const int buttonPin3 = 4;
const int buttonPin4 = 5;
int buttonState1 = 0;
int buttonState2 = 0;
int buttonState3 = 0;
int buttonState4 = 0;
/* This code sets up the essentials for your circuit to work. It runs first every time your circuit is powered with electricity. */
void setup() {
// Setup Serial which is useful for debugging
// Use the Serial Monitor to view printed messages
Serial.begin(9600);
Serial.println("start");
lcd.begin (16, 2);
lcd.print("Muiltitpe choice test");
lcd.print("Have Fun");
}
void loop() {
buttonState1 = digitalRead (buttonPin1);
buttonState2 = digitalRead (buttonPin2);
buttonState3 = digitalRead (buttonPin3);
buttonState4 = digitalRead (buttonPin4);
int reply = random(4);
lcd.clear (); //Here is the error
lcd.setCursor (0, 0);
lcd.print ("");
lcd.setCursor (0, 1);