What do you mean by “have some bugs”? What is it doing that you weren’t expecting? Does it happen for all range-meter values, or only some?
the timer is displayed on the lcd screen and when the distance sensor perceive less than 0.9 the timer go to zero. IT works, but on the display after some seconds doesn’t work
What do you mean “doesn’t work”? The display goes blank? The display shows erratic numbers that don’t match watch node? The display shows garbage characters? Smoke starts pouring out of the LCD? It is hard to guess at what the cause of the problem might be if we don’t know what the problem is…
Judging from your patch, the timer should reset when distance is greater than 0.1 (assuming that is a pulse-on-true node) and timer remains 0 until distance is less than 0.09, at which point timer starts counting.
Exatly , it work like this. I mean that the display shows erratic numbers that don’t mach watch node
Have you tried putting a format-number between the timer & LCD? This would allow you to force the number to a string. (it shouldn’t make a difference, but…)
If format-number doesn’t help, is there any kind of pattern to the displayed number verses the watch number? Does string on line 1 still display correctly when number on line 2 is wrong?
Can you link a tweak-number node to the 2nd line of LCD instead of timer & try different number values to see if they display correctly? If that doesn’t work, does it work when you use line 1 instead of line 2 for numbers? Does line 2 work with string instead of number?
From what I can see, it should be working, so these are things you can test to narrow down what the problem might be.
Note that the refresh change is caused by the change of pulse-on-change including the lcd node.
try multiplying the timer output by 100, let’s see what happens