Hello;
I use a timer to read weight from HX711 module in 1000 ms interval, the readings may go up or down slightly until load cell gets stable. I want to test the reading until there is no any change then stop reading from HX711 and indicate that by turning LED on or display it on LCD. if another change occured, for example weight object removed, start displaying again Like:
example video in this link
I use a timer to read weight from HX711 module in 1000 ms interval, the readings may go up or down slightly until load cell gets stable. I want to test the reading until there is no any change then stop reading from HX711 and indicate that by turning LED on or display it on LCD. if another change occured, for example weight object removed, start displaying again Like:
example video in this link
B4X:
private Sub ScaleTimer_Tick()
Dim Raw As Int = GetWeight() 'read from HX711
If IsStable(Raw) Then
TurnLedON 'turn led on then stop displaying any weight changes, until another change occures
Else
TurnLedOFF
DisplayWeightChanges(Raw) 'display weight changes on LCD until gets stable
End If
End Sub