Comments (7)
do you have:
#include "HX711.h"
at the top of your sketch file?
are you using
Hx711 scale(A1, A0);
or
HX711 scale(A1, A0);
?
use HX711 scale(A1, A0);
does the included example (HX711Serial) work?
from hx711.
Hi
I use HX711 scale(A1, A0), but the program send me the next message:sketch_sep08b.ino: In function 'void loop()':sketch_sep08b:12: error: 'class HX711' has no member named 'getGram'.The example (HX711Serial) is working correctly.
Im using this code:#include <HX711.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);HX711 scale(A1, A0);void setup() {lcd.begin(16, 2);}void loop() {lcd.setCursor(0, 0);lcd.print(scale.getGram(), 1);lcd.print(" g");lcd.print(" ");delay(200);} but in the blue line im having a mistake. Can you tell me how to resolve this issue ? Or if i have to use another function?
And thanks for your answer
Date: Sun, 7 Sep 2014 22:30:27 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [HX711] Library HX711 (#10)
do you have:
#include "HX711.h"
at the top of your sketch file?
are you using
Hx711 scale(A1, A0);
or
HX711 scale(A1, A0);
?
use HX711 scale(A1, A0);
does the included example (HX711Serial) work?
β
Reply to this email directly or view it on GitHub. =
from hx711.
there is no method getGram. see here for the methods you can call:
https://github.com/bogde/HX711/blob/master/HX711.h
see the example for a proper usage.
from hx711.
I ran into this issue too.
The documentation on ./README.md says that in the non-blocking mode we should:
// 4. Acquire reading without blocking
if (scale.wait_ready_timeout(1000)) {...
Instead, it should say:
// 4. Acquire reading without blocking
if (loadcell.wait_ready_timeout(1000)) {...
for consistency with the definition at the start of the example
HX711 loadcell;
from hx711.
Dear @r-a-i,
may I humbly ask for a pointer where you found this inconsistency? I just skimmed [1]Β and can't find any typo in there.
With kind regards,
Andreas.
[1] https://github.com/bogde/HX711/tree/master/examples
from hx711.
may I humbly ask for a pointer
Reading things more concentrated always makes sense. Sorry again for overlooking your reference to README.md
.
You are absolutely right. When fixing this, we might also think about making the example in README.md consistent with the example files referenced above, right?
Would you personally prefer scale
oder loadcell
as the name for a canonical variable name referencing the HX711 object? Technically, just calling it hx711
would also be fine but might confuse newcomers.
... just wanted to mention that I acknowledge we should bring more consistency into the code examples and that I am personally open for any better name if desired.
from hx711.
Dear @amotl, I just submitted a pull request for this change for your consideration.
Personally, I think the variable name "loadcell" is more generic as the "Hx711" is a loadcell amplifier. Some people may use loadcells to build "scales", but not always. In my case, I'm using a loadcell to measure a force directly and not weight.
Thank you for your consideration and all your contributions to this library.
from hx711.
Related Issues (20)
- Arduino 2 support
- Formula to find hx711 output of load cell voltage output HOT 1
- Arduino MKR 1010 Upload failure
- Arduino freezes after about 1 hour of continuous reading
- serial monitor freezes on arduino uno when data or clock from HX711 is connected to the arduino digital data pin
- Should function "scale.tare();" need a parameter? HOT 2
- add NRF to compatible boards list
- Verify my wiring (HX711 with four strain gauges) HOT 2
- Multiple HX711 with one clock HOT 1
- warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
- Reason behind using D2 and D3 pins HOT 1
- HX711 only reads once on startup HOT 2
- How to check load cell is connected or not
- What are possible values for scale.set_scale(2280.f); HOT 2
- 71
- self-calibration of load cell
- HX711 not thread safe?
- HX711 high current consumption
- Error on `make build-all` HOT 1
- 2 (or more) mass calibration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hx711.