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

I based this on the version you gave in the very first post:

#include <math.h>

const int transistorPin = 9;
int tempPin = 0;
int tempReading;
int x;
float angle = 0;

void setup()
{
  pinMode(9, OUTPUT); 
  Serial.begin(9600); 
}

void loop()
{
  tempReading=analogRead(tempPin);//temperature reading
  x=map(tempReading,150,170,1,5);//map the reading to change the frequency
  Serial.println(x);
  angle += 20.0/1500.0*x*PI;
  float val = (exp(sin(angle)) - 0.36787944)*108.0;//the function of breathing led
  Serial.println(val);
  analogWrite(transistorPin, val);
  delay(20);

}