Share this example!

Share this example with your friends on your favorite profile:

You can easily embed this example to your blog or website by copying the following code:

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/example/HX711/HX711Serial" frameborder="0"></iframe>


You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>



  • 2017-12-12 muni.Jothi

    my need is caliparate at first time ony that's enough, how can to this using hx711 for loadcell(200kg).please help me.

  • 2017-07-13 Shreevatsa Acharya

    How can i obtain the load value in a variable?

  • 2016-07-20 tzikis

    Nice. To be honest I wouldn't know how the sampling rate can change, you'd probably have to ask the developer of the library

  • 2016-07-19 fmarengo

    How can I modify the sampling rate, please? I would like it to be sampling_rate=80. Thanks!

  • 2016-07-19 fmarengo

    Hello! Thank you for this useful code! I modified it in order to set the input gain to either 64 or 128 (channel A) or 32 (channel B). I did it by adding the commands below. Thank you!
    int gain = 64; // 64 or 128 (default) for channel A or 32 for channel B.
    void setup() {
    scale.set_gain(gain); // gain for the input differential amplifier of the HX711 ADC

  • 2015-11-20 codebender

    This example was tested on 2016-06-11 and it compiles on Arduino Uno, Arduino Leonardo, Arduino Mega