#include <HX711_ADC.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include "HX711.h"
HX711 scale;
HX711_ADC LoadCell(8, 9);
LiquidCrystal_I2C lcd(0x27,16, 2);
void setup() {
LoadCell.begin();
LoadCell.start(450);
LoadCell.setCalFactor(420.0983);
scale.set_scale(8.4); // Ganti 8.4 dengan nilai kalibrasi yang Anda hitung
lcd.begin(16, 2);
lcd.backlight ();
}
void loop() {
LoadCell.update();
float i = LoadCell.getData();
lcd.setCursor(0, 0);
lcd.print("Weight[kg]:");
lcd.setCursor(0, 1);
lcd.print(i);
}