Not getting desired output

I am interfacing load cell and HX711 module with arduino UNO board. I have done connections as follows:
image
Code is as follows:

#include <HX711.h>
#include <Wire.h>

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 4;
const int LOADCELL_SCK_PIN = 5;

HX711 scale;

void setup() {
  Serial.begin(9600);
  scale.begin(LOADCELL_DOUT_PIN,LOADCELL_SCK_PIN);
}

void loop() {
  if (scale.is_ready()){
    long reading = (scale.read())*100;
    float grams = (float)(reading)/100000;
    Serial.print(grams);
  } else {
    Serial.println("HX711 not found");
  }
  delay(1000);
}

After I run the program when I place different known weights on the load cell, the output I am getting is HX711 not found. I am not able to understand where did I go wrong?

Hello and welcome. Which HX711 library are you using? And which load cell amplifier are you using?

I am using HX711 library by Rob Tilaart. The load cell is of 20 kg.

Library, check. But I was also asking about the amplifier. Is it for example the Sparkfun board? Or something else?

Hi, @shweg
Welcome to the forum.
Try this example code.

#include "HX711.h"

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 4;
const int LOADCELL_SCK_PIN = 5;

HX711 scale;

void setup() {
  Serial.begin(9600);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
}

void loop() {

  if (scale.is_ready()) {
    long reading = scale.read();
    Serial.print("HX711 reading: ");
    Serial.println(reading);
  } else {
    Serial.println("HX711 not found.");
  }

  delay(1000);
  
}

Tom.. :grinning: :+1: :coffee: :australia: