Hi All,
I am working with the HX711ADC library and I continue to get disconnected from the cloud and my photon begins breathing green immediately after I call on the variables valRight or valLeft. As you can see from the code below, I have two load cells set up to the photon and I am trying to get readings from both. I think it has something to do with either my void loop()
or the power_up()
/ power_down()
call sequence. Thanks in advance for the help!
#include "application.h"
#include "HX711ADC/HX711ADC.h"
int valueRight = 0;
int valueLeft = 0;
HX711ADC scaleRight(D5, D0); // parameter "gain" is ommited; the default value 128 is used by the library
HX711ADC scaleLeft(D6, D1);
void setup(){
Serial.begin(9600);
Particle.variable("valRight", valueRight);
Particle.variable("valLeft", valueLeft);
scaleRight.power_up();
scaleLeft.power_up();
}
void loop(){
valueRight = scaleRight.read();
valueLeft = scaleLeft.read();
scaleRight.power_down();
scaleLeft.power_down();
delay(5000);
scaleLeft.power_up();
scaleLeft.power_up();
}