Here is the setup and code in case some else runs into the same issue.
Arduino Uno Code:
#include <PID_v1.h>
// Analog output pin
#define outputPin 9
// thermistor analog pin
#define THERMISTORPIN A0
// how many samples to take and average
#define NUMSAMPLES 7
// how long between pid/sampling
#define SAMPLETIME 1000
//Define Variables we'll be connecting to
double Setpoint, currentTemp, Output;
//Specify the links and initial tuning parameters
PID myPID(¤tTemp, &Output, &Setpoint,9.06,0.66,31, DIRECT);
void setup() {
Serial.begin(9600);
analogReference(EXTERNAL);
pinMode(outputPin, OUTPUT);
//initialize PID setpoint *C
Setpoint = 100; //This is the target temp you need. I have it set for 100C
//turn the PID on
myPID.SetMode(AUTOMATIC);
myPID.SetSampleTime(SAMPLETIME);
//pid Autotuner
}
void loop() {
if (Serial.available() > 0) {
// get incoming byte:
Setpoint = Serial.parseFloat();
}
uint8_t i;
double average = 0;
// take N samples in a row, with a slight delay
for (i = 0; i < NUMSAMPLES; i++) {
average += analogRead(THERMISTORPIN);
delay(10);
}
average /= NUMSAMPLES;
currentTemp=resistanceToC(inputToResistance(average));
myPID.Compute();
analogWrite(outputPin, Output);
Serial.print("Set Point: ");
Serial.print(Setpoint);
Serial.println(" *C)");
Serial.print("Temperature: ");
Serial.print(currentTemp);
Serial.println(" *C)");
Serial.print("PID output ");
Serial.println(Output);
delay(SAMPLETIME);
}
double inputToResistance(double input) {
// funtion to convert the input value to resistance
// the value of the 'other' resistor
double SERIESRESISTOR = 10000;
input = 1023 / input - 1;
return SERIESRESISTOR / input;
}
double resistanceToC(double resistance) {
// funtion to convert resistance to c
// temp/resistance for nominal
double THERMISTORNOMINAL = 118000;
double TEMPERATURENOMINAL = 25;
// beta coefficent
double BCOEFFICIENT = 3950;
double steinhart;
steinhart = resistance / THERMISTORNOMINAL; // (R/Ro)
steinhart = log(steinhart); // ln(R/Ro)
steinhart /= BCOEFFICIENT; // 1/B * ln(R/Ro)
steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To)
steinhart = 1.0 / steinhart; // Invert
steinhart -= 273.15; // convert to C
return steinhart;
}