Hello, im using thinker card to make that my lcd says something one a button on the A0 pin is pressed. it runs, says there’s no errors but when i start it up and press it, nothing happens. Here’s the Cod
ok i went to my local library (its has a robotics lab) and we fixed some stuff but now i got this code. but it dosent recognize the liquidcrystal library or smt.
// C++ code
//
int Off = 0;
int On = 0;
int Activation = 0;
Adafruit_LiquidCrystal lcd_1(0);
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
lcd_1.begin(16, 2);
pinMode(A0, INPUT_PULLUP);
Activation = Off;
digitalWrite(LED_BUILTIN, HIGH);
lcd_1.setBacklight(1);
lcd_1.print("WorkPrinter");
lcd_1.setCursor(0, 1);
lcd_1.print("Press Start");
while (!(Activation == Off)) {
if (digitalRead(A0) == LOW) {
Activation = On;
}
if (Activation == On) {
lcd_1.clear();
lcd_1.setCursor(0, 0);
lcd_1.print("Ready to print");
}
}
}
void loop()
{
delay(10); // Delay a little bit to improve simulation performance
}
it says that liquidcrystal does not name a type and lcd is not declared in this scope. idk im really confused. you can put this in the arduino app itself or thinker and if you wanna know what i meant.
You forgot to include the Adafruit_LiquidCrystal library.
When starting out with a new device like an LCD, first wire it up correctly (follow a tutorial, Adafruit has some of the best), then run one of the library examples to test it.