Need help with LCD programming for Arduino Uno

Hello! I have been working on trying to learn how to use a LCD, but code that should work gives me an error message where it can’t compile for Arduino Uno, even though it compiles for a ESP32. Here is my code:

#include  <LiquidCrystal.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;

LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {


lcd.begin(16, 2);

lcd.print("hello, world!");
}

void 
loop() {

lcd.setCursor(0, 1);

lcd.print(millis() /1000);

}

Any help would be appreciated. Thanks in advanced!

Please post the full error message

Using board 'uno' from platform in folder: /Users/niko/Library/Arduino15/packages/arduino/hardware/avr/1.8.5
Using core 'arduino' from platform in folder: /Users/niko/Library/Arduino15/packages/arduino/hardware/avr/1.8.5

Detecting libraries used...
/Users/niko/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/niko/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/niko/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/standard /private/var/folders/rs/djh9ph251kg3_bd99vcglbn00000gn/T/arduino-sketch-CBCB6A0C8AA6D96249A1D87A9E9C2B8E/sketch/sketch_may12a.ino.cpp -o /dev/null
fork/exec /Users/niko/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: no such file or directory

Compilation error: fork/exec /Users/niko/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: no such file or directory

is this saying avr-g++ is missing?

the compiler in my Arduino IDE 1.8.13 is under
C:\Tools\Arduino hardware\tools\avr/bin/avr-g++

my esp32 libraries are under Arduino15

So how do I switch to the right library and which one do I switch it to?

it's not the library, but the installation of the IDE

So then do I just delete and reinstall both IDEs? It’s happening for both (the old and new)

i don't know what you mean by both.

The old IDE and the new IDE (I use both)

looks like one is confused about where the compiler is. trying re-installing

Re-installed and got same error message

i'd start a new thread with the above description. the title of this thread says you have an LCD problem

Did you do a clean uninstall and re-install? Like recommended in this thread?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.