Load cell + led arduino uno

i dont know how to make im newbie plese help me

i have 4 load cell 50kg and i want led open at 30.5kg how?

Do you have an amplifier for the load cell like the HX-711?

Are you able to read the load cell?

What Arduino?

Do you know the if structure?

Please read the how to get the most from the forum post. The post contains information on what we need to know in order to help you.

Including information like the data sheets for the load cell and the load cell amplifier would be welcome.

yes iuse HX-711and i use arduido uno

Show what You have achieved so far.

Hi! Welcome to the Forum!

As you will realize soon, the Forum is not likely to give you a ready to eat pie. Specially if you are on a cooking class and the pie is your homework.

Newbies should start reading lots of tutorials and following examples that come inside Arduino IDE until they´re comfort with sketch structure, a little C++ and dealing with simple electronic components.

Big projects are done with the sum of small steps.

Load cells are not exactly the easiest way to start, let alone multiple unities, but HX711 libraries use to have some examples.

After you start your walk through the wonderful world of Arduino,

and

I´m sure there will be many fellows here who will try to help you with your doubts.

Have fun! :upside_down_face:

#include "HX711.h"

#define calibration_factor -22060.00 //This value is obtained using the SparkFun_HX711_Calibration sketch

#define LOADCELL_DOUT_PIN 3
#define LOADCELL_SCK_PIN 2
const int (led1) = 5;
const int(led2) = 6;

HX711 scale;

void setup() {
Serial.begin(9600);
Serial.println("HX711 scale demo");

scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
scale.set_scale(-22060.f); //This value is obtained by using the SparkFun_HX711_Calibration sketch
scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

Serial.println("Readings:");
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
}

void loop() {
Serial.print("Reading: ");
Serial.print(scale.get_units(), 2); //scale.get_units() returns a float
Serial.print(" Kg"); //You can change this to kg but you'll need to refactor the calibration_factor
Serial.println();
Serial.print("measurement");
delay(200);
if (scale.read () >= 1.25 ) {
digitalWrite (led1,HIGH);
digitalWrite (led2,LOW);
}
else if(scale.read () <= 0.75 )
{
digitalWrite (led1,LOW);
digitalWrite (led2,HIGH);
}
}

may i know where is problem led not funtion

Are you seeing proper weights being printed?

Please post a wiring diagram and clear photos of your wiring.

Please format your code and post code in a code block. The "how to get the best of the forum" post at the top of every forum section tell you how. Go back and fix your firdt post.

There goes some tips:

  1. You didn´t read How to get the best out of this forum , otherwise you would have posted your code in code tags and properly formatted.

  2. You´re printing the result of scale.get_units(), then using scale.read () - a raw value - in your if statement. Each of these functions bring different values.

  3. What happens to the leds if the weight is between 0.75 and 1.25?