Horsefeathers!
You posted that you were getting "random" flashing, "not working", "doesn't work" and that like.
Maybe I'm having an aneurysm. Does anybody else smell burning toast?
So your beef all along has been the transitions?
My "guess" would be to structure the equation so that any new value of x is incorporated when the output is:
a) at max
OR
b) at min.
[/quote]
Sorry for not being clear, what I meat by ' not working' is the result is not good enough for my at installation, and random flash means the val output not following the curve. I wrote a lot of these program, including case switch and if statement, but none of them seem to work flawlessly. Can u think of a way to control the breath light using temperature? Maybe use a new function or pwm, I've already tried everything I know. Sorry for the rudeness, I was really angry, since the last one I wrote should work perfectly in theory, but didn't acutely work out. Thanks for helping me.