GithubHelp home page GithubHelp logo

scale.get_max about hx711 HOT 3 CLOSED

bogde avatar bogde commented on July 17, 2024
scale.get_max

from hx711.

Comments (3)

bogde avatar bogde commented on July 17, 2024

if i understand your requirements correctly, you just need to store and print the max value in your code. something like this:

...
value = 0;
temp = scale.get_value();
if (temp > value)
{
    value = temp;
    ...
    lcd.print(value);
}
...

from hx711.

cgdavis007 avatar cgdavis007 commented on July 17, 2024

Your understanding is correct. I've tried if and for statements and even while loops. I integrated your suggestion into my code but the value returned is not in units and varies from reset to reset with no change once weight/force is applied to the load cell. Do you have any other suggestions? Thanks in advance.

from hx711.

bogde avatar bogde commented on July 17, 2024

you can use get_units instead of get_value. the max value you're storing in value won't survive a reset unless you save it somewhere in the eeprom (see https://www.arduino.cc/en/Reference/EEPROM).

from hx711.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.