//place known weights and write down what it says on the display
#include "HX711_ADC.h"
#include <LiquidCrystal_I2C.h>
const int loadConstant = 420;
const int tareButton = 13;
float weight;
#define I2C_ADDR 0x27
#define LCD_COLUMNS 16
#define LCD_LINES 2
LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_LINES);
HX711_ADC LoadCell(A1, A0);
void setup() {
pinMode(tareButton, INPUT);
Serial.begin(9600);
lcd.init();
lcd.backlight();
LoadCell.begin();
LoadCell.start(1000);
LoadCell.setCalFactor(1);
}
void loop() {
LoadCell.update();
weight = LoadCell.getData()/loadConstant;
Serial.println(weight);
lcd.setCursor(5, 0);
lcd.print(weight);
/*
if (digitalRead (tareButton) == LOW){
lcd.clear();
lcd.setCursor(3, 0);
lcd.print("Taring");
LoadCell.start(1000);
lcd.clear();
}
*/
}