HX711ADC library not compiling?

I added this library to my project as it depends on the weight, but every time I try to verify my code I keep getting this same error:

/src/automatedhookset.cpp:8:22: fatal error: HX711ADC.h: No such file or directory
 #include <HX711ADC.h>

compilation terminated.
make[1]: *** [../build/target/user/platform-10src/automatedhookset.o] Error 1
make: *** [user] Error 2

Could anyone explain to me what I am doing wrong?

Could you show a Screenshot of the IDE where we can see the files/libraries that have been included?

Can you try changing the statement to #include "HX711ADC.h"?
I keep having this issue, when you first import a library you sometimes need to change the include statement, but after that you can change it back and it still builds - no idea why.

sorry for the late response…
Yeah I tried that already and it still doesn’t work.

I see you are still using 0.4.8 firmware as target (see bottom right in your Web IDE)
That won’t help :wink:

Try updating to the current release version 0.6.1

Yeah I updated it earlier thinking that could possibly be the problem but I am still getting the same error. I’m at 0.6.1 now.

Can you post your full code (in a PM if you don’t want it seen by others)?

Here is my code as of now:

 * Include Libraries

#include "Ubidots.h"
#include "HX711ADC.h"
 * Define Constants

#define DOUT  D0

#define CLK  D1

#define TOKEN "ubidots token #"  // My Ubidots TOKEN

Ubidots ubidots(TOKEN);

HX711ADC scale(DOUT, CLK);

float calibration_factor = -7050; //from sparkfun example (May be incorrect)

 * Main Functions

void setup() {
scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

void loop() {
float weight = scale.getunits();
ubidots.add("weight", weight);  // Change for your variable name

After a minor change to your code scale.getunits(); to scale.get_units(); that builds for me.

Maybe just create a new project, copy/paste your code there, reimport the libs but remove the extra includes and see if that changes anything.

1 Like

Thank you! As soon as I started the new project it compiled.

1 Like