Breathing LED controlled by temperature sensor (NEED HELP!!)

kovil:
Whats the point of /17?

x=map(tempReading,150,170,1,5);
OK, map is resulting a range of 1 to 5 already, provided that 150 < tempReading < 170.
Is that the situation, those are your results?
tempReading=analogRead(tempPin);
Serial.println(tempReading,DEC); // this is always a number 150-170 ??

kovil:
Yeah, I know the fade works if there is no x...

No, x is needed either way.