fix minor issues
This commit is contained in:
@@ -32,16 +32,16 @@ void loop()
|
|||||||
/* Put your code here to read ADCs and convert ADC voltages to
|
/* Put your code here to read ADCs and convert ADC voltages to
|
||||||
temperatures */
|
temperatures */
|
||||||
thermistor_val = analogRead(ThermistorPin);
|
thermistor_val = analogRead(ThermistorPin);
|
||||||
thermocouple_val = analogRead(TCpin)
|
thermocouple_val = analogRead(TCpin);
|
||||||
// Calculate thermistor temperature in degrees C ( Part b, i,ii,iii & v)
|
// Calculate thermistor temperature in degrees C ( Part b, i,ii,iii & v)
|
||||||
thermistor_temp = kelvin_to_c(resistance_to_temperature(voltage_to_thermistor_resistance(adc_to_voltage(thermistor_val))));
|
thermistor_temp = kelvin_to_c(resistance_to_thermistor_temperature(voltage_to_thermistor_resistance(adc_to_voltage(thermistor_val))));
|
||||||
|
|
||||||
// Calculate thermocouple temperature in degrees C ( Part c, i - iv)
|
// Calculate thermocouple temperature in degrees C ( Part c, i - iv)
|
||||||
e_rc = 1000*voltage_to_erc(adc_to_voltage(thermocouple_val)); // convert to millivolts
|
e_rc = 1000*voltage_to_erc(adc_to_voltage(thermocouple_val)); // convert to millivolts
|
||||||
e_comp = NISTdegCtoMilliVoltsKtype(thermistor_temp); // eqn (6) lab prep sheet
|
e_comp = NISTdegCtoMilliVoltsKtype(thermistor_temp); // eqn (6) lab prep sheet
|
||||||
thermocouple_temp = NISTmilliVoltsToDegCKtype(e_rc + e_comp); // eqn (7) lab prep sheet
|
thermocouple_temp = NISTmilliVoltsToDegCKtype(e_rc + e_comp); // eqn (7) lab prep sheet
|
||||||
|
|
||||||
/* Display results. Don't use printf or formatting etc., they don't work on the Arduino. Just use
|
/* Display results. Don't use printf or formatting etc., they don't work on the Arduino. Just use
|
||||||
the serial print statements given here, inserting your own code as needed */
|
the serial print statements given here, inserting your own code as needed */
|
||||||
Serial.print("Thermistor temperature (deg C): ");
|
Serial.print("Thermistor temperature (deg C): ");
|
||||||
Serial.println(thermistor_temp);
|
Serial.println(thermistor_temp);
|
||||||
|
|||||||
Reference in New Issue
Block a user