Hi,
I was experimenting with LCD displays using I2C and copied some basic code with the library <LiquidCrystal_I2C.h>
I uploaded the code to my uno board and all of a sudden, this error message pops up.
C:\Users\palla\Documents\Arduino\I2c_Adrs_Finder\ESC_Ctrls.ino: In function 'void setup()':
C:\Users\palla\Documents\Arduino\I2c_Adrs_Finder\ESC_Ctrls.ino:6:6: error: redefinition of 'void setup()'
void setup()
^~~~~
C:\Users\palla\Documents\Arduino\I2c_Adrs_Finder\I2c_Adrs_Finder.ino:7:6: note: 'void setup()' previously defined here
void setup() {
^~~~~
C:\Users\palla\Documents\Arduino\I2c_Adrs_Finder\ESC_Ctrls.ino: In function 'void loop()':
C:\Users\palla\Documents\Arduino\I2c_Adrs_Finder\ESC_Ctrls.ino:19:6: error: redefinition of 'void loop()'
void loop()
^~~~
C:\Users\palla\Documents\Arduino\I2c_Adrs_Finder\I2c_Adrs_Finder.ino:40:6: note: 'void loop()' previously defined here
void loop() {}
^~~~
exit status 1
Compilation error: redefinition of 'void setup()'
Do any of you know what I should do?
Here is my code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(1,0);
lcd.print("hello everyone");
lcd.setCursor(1,1);
lcd.print("This works");
}
void loop()
{
}