revised calibration

This commit is contained in:
firebadnofire 2025-06-07 12:05:01 -04:00
parent d9c7305cf8
commit e2c27cab13
Signed by: firebadnofire
SSH key fingerprint: SHA256:bnN1TGRauJN84CxL1IZ/2uHNvJualwYkFjOKaaOilJE
2 changed files with 1 additions and 2 deletions

View file

@ -15,7 +15,6 @@ const (
vendorID = 0x1446
productID = 0x6A73
refreshRate = 500 * time.Millisecond
calibration = 0.952 // scale correction factor: 2.1 reported = 2.0 actual
)
func main() {
@ -52,7 +51,7 @@ func main() {
}
raw := binary.LittleEndian.Uint16(buf[4:6])
oz := float64(raw) / 10.0 * calibration
oz := float64(raw) / 10.0
rounded := math.Round(oz*10) / 10
fmt.Printf("\r📦 Weight: %.1f oz ", rounded)

Binary file not shown.