Hello,
I've these string variables and I want to get number of units (count objects on weighing scale) when i divide weight by unit-weight arduino MEGA crashes with no restart even if I changed type of
NumberOfUnits variable from Ulong to Double. If weight = 0 no errors occured. any Ideas?
I read UnitWeight from SD card one time and store it in global variable
weight read from loadcell every 1000 ms, calculation and data display on lcd done inside timer_tick sub
I've these string variables and I want to get number of units (count objects on weighing scale) when i divide weight by unit-weight arduino MEGA crashes with no restart even if I changed type of
NumberOfUnits variable from Ulong to Double. If weight = 0 no errors occured. any Ideas?
I read UnitWeight from SD card one time and store it in global variable
B4X:
Dim strUnitWeight As String = "0.004"
weight read from loadcell every 1000 ms, calculation and data display on lcd done inside timer_tick sub
B4X:
Private Sub wTimer_tick()
Dim strWeight As String = GetWeight() 'i.e "400" grams
Dim dUnitWeight As Double = strUnitWeight
Dim dWeight As Double = strWeight
Dim NumberOfUnits as Ulong= dWeight / dUnitWeight