--- In basicx@basi..., Mikael Karstikko <makarst@p...> wrote:
What happens of your pressure is between -0.1 and 0?
Like, what if it is -0.05?
In the code you gave this value would not be changed.
Maybe you meant in the second if-then.... if pres >-0.1 then.....
This would zero out all the barely negative numbers.
Remember, less than means "to the left of" on the number line.
Otherwise use ABS() to get rid of the sign.
Reply by Mikael Karstikko●November 17, 20052005-11-17
Hello All !
Once again I am at a loss ...
My pressure sensor fluctuates a little so the display shows 0.0 and -0.0
The display should show numbers between -1.0 to 6.0 bars ... but not
the value -0.0 whitch flickers annoyngly ..
Why doesn't this work ??
Dim pres as single
If pres < 0.0 then 'this is my nonworking bypass of value -0.0
If pres < -0.1 then ' and I have tried changing this to (-0.1) ..
pres = 0.0
Call putqueuestr(lcd_out, fmt(pres, 1)) ' here it is displayed on the LCD-X
Thank You All for Your help regarding my previous problems !!