 }
 
 void loop() {
-  Compute();
+  while(Serial.available() > 0){
+    char inChar = Serial.read();
+    if(isDigit(inChar)){
+      inString += (char)inChar;
+    }
+    else{ // if(inChar == '\n'){
+      int pwm = inString.toInt();
+      Serial.print("PWM: ");
+      Serial.println(pwm);
+      analogWrite(heat0, pwm);
+      inString = "";
+    }
+  }
+  if (millis() - lastTime >= 2000){
+    Serial.print("Current Temp: ");
+    Serial.println(getCurrTemp());
+    lastTime = millis();
+  }
+//  Compute();
 }

  Serial.println(res);
  float temp = BETA/log(resistance/R_INF)-273.15;
  String tempString = "Temp: " + String(temp);
  Serial.println(tempString);
  return temp;
}


//  analogWrite(fan2, 0);
  Serial.begin(9600);

  while(! Serial);
  Serial.println("Enter PWM Value");

//  SetTunings(50, 1, 9); // Sets the initial PID parameters

//  pinMode(slaveSelectPin, OUTPUT);
//  SPI.begin();
