diff --git a/main.go b/main.go index 6196371..8b02bed 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,7 @@ const ( vendorID = 0x1446 productID = 0x6A73 refreshRate = 500 * time.Millisecond + calibration = 0.952 // scale correction factor: 2.1 reported = 2.0 actual ) func main() { @@ -51,7 +52,7 @@ func main() { } raw := binary.LittleEndian.Uint16(buf[4:6]) - oz := float64(raw) / 10.0 + oz := float64(raw) / 10.0 * calibration rounded := math.Round(oz*10) / 10 fmt.Printf("\r📦 Weight: %.1f oz ", rounded) diff --git a/scale-code b/scale-code index 9f0ab6a..ac3c3de 100755 Binary files a/scale-code and b/scale-code differ