Error with LCD

Hey there!

I am trying to make a scale with this code

#include "Arduino.h"
#include "HX711.h"

//#define RST 4
#define DOUT  11
#define CLK  10
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F,16,2);

// Create our LoadCell object
HX711 scale(DOUT, CLK);

void setup() {
	Serial.begin(9600);
 lcd.init();
  // Print a message to the LCD.
  lcd.backlight();

	scale.set_scale();
	scale.tare();  //Reset the scale to 0
}

void loop() {
	//Adjust to this calibration factor
	scale.set_scale(-376.0);

	// Read an average of X readings
	Serial.println("Reading weight");
	float grams = scale.get_units(5);
  float ounce = (grams*(0.035));
  float pound = (grams*(0.00220462));
  

	Serial.print(grams);
	Serial.println(" g");

 lcd.setCursor(0,0);
  lcd.print("Gram:");
  lcd.print(grams);
  
  lcd.setCursor(0,1);
  lcd.print("Oz:");
  lcd.print(ounce,2);

  lcd.setCursor(9,1);
  lcd.print("LB:");
  lcd.print(pound,2);

  

  
}

But i constantly get errors, i thought I fixed them but they keep on appearing…
Can you pleaseee help me out?
I’m still new to arduino.

this is the error message i’m getting

Board:"Arduino/Genuino Uno"

/Downloads/Uno_HX711_PROD_08Oct17/Uno_HX711_PROD_08Oct17.ino:10:32: warning: invalid conversion from 'int' to 't_backlighPol' [-fpermissive]
 LiquidCrystal_I2C lcd(0x3F,16,2);
                                ^
In file included from 

/Downloads/Uno_HX711_PROD_08Oct17/Uno_HX711_PROD_08Oct17.ino:8:0:
/Documents/Arduino/libraries/Newliquidcrystal_1.3.5/LiquidCrystal_I2C.h:53:4: note: initializing argument 3 of 'LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, t_backlighPol)'
    LiquidCrystal_I2C (uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol);
    ^
/Documents/Arduino/libraries/Newliquidcrystal_1.3.5/LiquidCrystal_I2C.h: In function 'void setup()':
/Documents/Arduino/libraries/Newliquidcrystal_1.3.5/LiquidCrystal_I2C.h:154:9: error: 'int LiquidCrystal_I2C::init()' is private
    int  init();
         ^
Uno_HX711_PROD_08Oct17:17: error: within this context
  lcd.init();
           ^
exit status 1
within this context

Thanks in advance!!

Hello,
this is programming related problem, not avrdude.

Anyway, the constructor requires 3th parameter to be t_backlighPol type. It is defined in LCD.h as follows:

typedef enum { POSITIVE, NEGATIVE } t_backlighPol;

Next problem is lcd.init(), init is private method not accessible for user. You should use begin().
I am recommending to start with library example first.