#include "HX711_ADC.h"
#include <LiquidCrystal_I2C.h>
HX711_ADC LoadCell(9, 8);
LiquidCrystal_I2C lcd(0x27,16,2);
int num = 1;
int buttonState = 0;
int buttonState1 = 0;
float z1 = 28.3495;
long Time1 = 3000;
long Time2 = 1000;
void setup()
{
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.clear();
lcd.setCursor(1, 0);
lcd.print("Weighing Scale");
lcd.setCursor(3, 1);
lcd.print("With Alarm");
delay(2500);
lcd.clear();
delay(150);
lcd.setCursor(3, 0);
lcd.print("Taring");
delay(200);
lcd.setCursor(9, 0);
lcd.print(".");
delay(200);
lcd.setCursor(10, 0);
lcd.print(".");
delay(200);
lcd.setCursor(11, 0);
lcd.print(".");
delay(200);
lcd.setCursor(12, 0);
lcd.print(".");
delay(200);
delay(1000);
lcd.clear();
LoadCell.begin();
LoadCell.start(1000);
LoadCell.setCalFactor(0.42);
}
void loop() {
LoadCell.update();
float i = LoadCell.getData();
float z = i/28.3495;
lcd.setCursor(1, 0);
lcd.print("Weighing Scale");
lcd.setCursor(9,1);
lcd.print(i, 0);
lcd.print("g ");
}