Arduino Contol Fails

What is getting stored in sensorValue? Why not print it, and find out?

How about you read the code?