Im getting same sort of issue, i have tried so many libraries and YT vids and forums and im still getting compile errors
I want 1c2 for a 2x16 just like the OP
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//LiquidCrystal_I2C lcd(0x38); // Set the LCD I2C address
#define I2C_ADDR 0x38;
#define LiquidCrystal_I2C lcd(I2C_ADDR);
init()
#define BACKLIGHT_PIN 13;
void setup()
{
// Switch on the backlight
pinMode ( BACKLIGHT_PIN, OUTPUT );
digitalWrite ( BACKLIGHT_PIN, HIGH );
lcd.begin(16,2); // initialize the lcd
lcd.home (); // go home
lcd.print("Hello, ARDUINO ");
lcd.setCursor ( 0, 1 ); // go to the next line
lcd.print (" WORLD! ");
}
void loop()
{
}
error:
Arduino: 1.8.2 (Windows 7), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck, Disabled, None"
i2c_lcd_2x16_example3:13: error: expected constructor, destructor, or type conversion before 'void'
void setup()
^
G:\Backup\New Arduino\2017 Projects\LCD_I2C_Adapter\i2c_lcd_2x16_example3\i2c_lcd_2x16_example3.ino: In function 'void setup()':
i2c_lcd_2x16_example3:11: error: expected ')' before ';' token
#define BACKLIGHT_PIN 13;
^
G:\Backup\New Arduino\2017 Projects\LCD_I2C_Adapter\i2c_lcd_2x16_example3\i2c_lcd_2x16_example3.ino:16:13: note: in expansion of macro 'BACKLIGHT_PIN'
pinMode ( BACKLIGHT_PIN, OUTPUT );
^
i2c_lcd_2x16_example3:16: error: expected primary-expression before ',' token
pinMode ( BACKLIGHT_PIN, OUTPUT );
^
i2c_lcd_2x16_example3:16: error: expected ';' before ')' token
pinMode ( BACKLIGHT_PIN, OUTPUT );
^
i2c_lcd_2x16_example3:11: error: expected ')' before ';' token
#define BACKLIGHT_PIN 13;
^
G:\Backup\New Arduino\2017 Projects\LCD_I2C_Adapter\i2c_lcd_2x16_example3\i2c_lcd_2x16_example3.ino:17:18: note: in expansion of macro 'BACKLIGHT_PIN'
digitalWrite ( BACKLIGHT_PIN, HIGH );
^
i2c_lcd_2x16_example3:17: error: expected primary-expression before ',' token
digitalWrite ( BACKLIGHT_PIN, HIGH );
^
i2c_lcd_2x16_example3:17: error: expected ';' before ')' token
digitalWrite ( BACKLIGHT_PIN, HIGH );
^
i2c_lcd_2x16_example3:19: error: 'lcd' was not declared in this scope
lcd.begin(16,2); // initialize the lcd
^
exit status 1
expected constructor, destructor, or type conversion before 'void'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.