gandalf15/HX711

HX711 in C not giving any data

Closed this issue · 1 comments

Hi
Im trying to use the library on C
I already connected everything and run this line: sudo ./read_scale 22 23 10
The problem is this one:
Zero the scale... When ready press return key.

Zero scale is done!
Put a single item on the scale. When ready press return key.

Single_item_weight: 0.000000

Set up is done.

1 - Print number of items on the scale.
2 - Print raw mean value.
3 - Zero the scale.
4 - Set new item.
4
Put a single item on the scale. When ready press return key.

Single_item_weight: 0.000000

Set up is done.

1 - Print number of items on the scale.
2 - Print raw mean value.
3 - Zero the scale.
4 - Set new item.
1

Data mean: 0

Current number of items on the scale: 0
1 - Print number of items on the scale.
2 - Print raw mean value.
3 - Zero the scale.
4 - Set new item.
2

Raw data: 0
1 - Print number of items on the scale.
2 - Print raw mean value.
3 - Zero the scale.
4 - Set new item.
3
Zero the scale... When ready press return key.

Zero scale is done!
1 - Print number of items on the scale.
2 - Print raw mean value.
3 - Zero the scale.
4 - Set new item.
4
Put a single item on the scale. When ready press return key.

Single_item_weight: 0.000000

Set up is done.

As you can see, I got no weight at all, even when I stand on top of the scale.
Im using the BCM numbering and I got the WiringPi library.
Any idea of why I got no weight at all?
Thanks for your help

Hi MikeAP23,
I am sorry for the late reply. As a first thing try to recompile with these commands.
$ make clean
this cleans the binaries and then run
$ make
Then try it again. pls let me know if that works.