John Hart
Published © GPL3+

The Dragon Weigher - Arduino Uno Controlled HX711

Arduino and HX711 Load Cell weight scale to keep track of our Bearded Dragon's weight. He's too long for typical kitchen scale.

BeginnerFull instructions provided2 hours5,378
The Dragon Weigher - Arduino Uno Controlled HX711

Things used in this project

Story

Read more

Code

Arduino Uno powered HX711 w/1602LCD-I2C Serial Backpack

Arduino
#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.035274));
  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);

  

  
}

Credits

John Hart

John Hart

5 projects • 12 followers
Blinked my first LED in August 2016...had never even heard of Arduino before then. Now I CAN'T STOP MAKING THINGS! Arduino UNO & ESP8266

Comments