Hello.
One immediate problem I see is that analogRead() never returns a value over 1023, so your first check can never be true. Also, if you want to use analog input 7, make sure you have removed the ADC7 jumper that ties it to the trimpot. Finally, the first three lines of your program don’t do anything useful. A good way to figure out what is going on would be to have your program print the sensor readings to the LCD.
Before you make future posts, please read our post on advice for getting help. Your opening post is not adequate. For example, if you post a program, please simplify it as much as possible and say what happens when the program runs (and please use [ code ][ /code ] tags to make it more readable). You also should provide more information about your setup (e.g. what sensor are you using and how is it connected?).
- Ben
