I am currently working on HX710B air pressure sensor and I have been working fine till I tried to run more one air pressure sensor but I am facing some issues because It is reading only one sensor and not the other one can anyone please help me out.
I will be very thankful to that.
type or paste code here
#include "HX711.h"
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;
const int LOADCELL_DOUT = 4;
const int LOADCELL_SCK = 5;
int a=0;
int b=0;
HX711 scale;
void setup()
{
Serial.begin(9600);
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
scale.begin(LOADCELL_DOUT, LOADCELL_SCK);
void loop()
{
a=(scale.read()/100000);
Serial.println(a);
b=(scale.read()/100000);
Serial.println(b);
delay(1000);
}
your code has nothing to do with a second sensor. Please post the code you used when you attempted to read the second sensor and we can help with that.
#include "HX711.h"
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;
const int LOADCELL_DOUT = 4;
const int LOADCELL_SCK = 5;
int a=0;
int b=0;
HX711 scale;
void setup()
{
Serial.begin(9600);
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
scale.begin(LOADCELL_DOUT, LOADCELL_SCK);
void loop()
{
a=(scale.read()/100000);
Serial.println(a);
b=(scale.read()/100000);
Serial.println(b);
delay(1000);
}
here is the code for two hx710b air pressure sensor but it reading only one sensor.