hx711 LoadCell helpers for tinygo
This is a set of helpers to use a Load cell through a hx711 using tinygo,
even though according to most device docs and C codes available indicate this
should work in any version of these devices, I only tried it in one.
Special thanks to:
Usage
package main
import (
"tinygo.perri.to/hx711"
"machine"
)
dev := hx711.New(machine.D4, machine.D5, hx711.Gain128, 100, 400)
dev.Calibrate(100.10)
weight := dev.Read()
fmt.Printf("whatever is on the scale is %d milligrams", weight)
The results are in centigrams, I assume this is true for all models, I only own one hx711 with a 1kg load cell.