I’m building a shipping interface that uses a USB scale connected by WebHID. The WebHID code takes the scale weight and puts the value into a page data property.
I want to trigger a function to create a shipping label when weight is on the scale, but the weight needs to be constant. If the weight is still fluctuating as the person puts the package on the scale, the label will be incorrect.
I’m thinking about running a timer to see if the weight is the same over a sample time period, but I wanted to see if anyone had a better suggestion.
Thanks,
Tim