LCENJ HX711 examples - 2026-09-08
Original example code: CC0-1.0. External library retains its own MIT license.
Install bogde/HX711 version 0.7.5 from https://github.com/bogde/HX711
Put each .ino in a SEPARATE folder with the SAME basename; do not compile both together.
Target: Arduino Uno (DOUT D2, PD_SCK D3) or generic ESP32 (DOUT GPIO19, PD_SCK GPIO18).
Verify your board pinout and HX711 supply/logic voltage before wiring.
Never feed 5 V logic into ESP32. Read the article's power-supply caveats.
Use channel A and a correctly wired full bridge; this is NOT I2C.
Serial monitor: 115200 baud, Newline (or Both NL & CR).
Main example: empty platform -> t -> place known mass -> c 500 (ONLY for a known 500 g mass).
Calibration is not stored after reset. p prints parameters. Negative factors are valid.
Validate with other reference masses; displayed decimals do not imply accuracy.
Raw example prints counts, not grams. Neither example was tested on physical hardware.
