Redifinition of Void Setup

Hi. I am kinda new to Arduino. Been getting this msg since trying to make a lcd work.
"Redifition of void setup()"
I wonder why. Can anyone help? Everything else workin' fine...

My code:

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27,16,2);
void setup()
{
  lcd.init();
  lcd.backlight();
  lcd.setCursor(0,0);
  lcd.print("Hello, world!");
}

void loop()
{
 
}

Welcome to the forum

You don't have 2 setup() functions in the code that you posted but you probably have another one in a second tab that you have in the IDE

If you had posted the full error message then there would be more details

1 Like

The error means that you have more than one setup() function in the code.
It seems that you uploaded not that code, that you inserted in the forum

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