Why do you break in the for loop? that makes it escape the for loop, and thus will not dim your LED.
Also, you try to make a statement with:
if (sensorVal =38 ) {
Please change that to:
if (sensorVal ==38 ){
Notice the double ==.
a single '=' is used to assign a value to a variable, e.g. cnt = 5; and cnt will be 5.
to make a statement, you have to use a double '==' so that it know it's a statement, and not an assignment:
if (sensorVal == 38) { etc