Peter2013:
I have king of done now by adding the value received at the serial terminal, its seen it cannot handle a long list of if statement, b ut there strange it does in some other way
If your coding is as bad as your spelling then it's no wonder it doesn't work right. ![]()
Your description is a bit incoherent but guessing at what you're trying to say you have concluded that the if statements are not doing what you intended. If you think this means "it cannot handle a long list of if statement" then you are mistaken. It handles long lists of if statements just fine. The problem is that you have not coded the if statements correctly. This is almost inevitable given the chaotic way you have laid your code out, making it almost impossible to see what the structure is. Lay the code out sensibly as PaulS advised you and it will be obvious what it is doing. Most likely you will then see the problem. If you don't, then explain what it's supposed to do and what it actually does and I'm sure somebody will point out where the mistake is.