diff --git a/Lab_1/TwoSensorsSkeleton.c b/Lab_1/TwoSensorsAAR.c similarity index 94% rename from Lab_1/TwoSensorsSkeleton.c rename to Lab_1/TwoSensorsAAR.c index d399be8..89cd289 100644 --- a/Lab_1/TwoSensorsSkeleton.c +++ b/Lab_1/TwoSensorsAAR.c @@ -15,12 +15,10 @@ float voltage_to_erc(float v); int main() { - // Define VRef float v_ref = 5, e_rc, e_comp; float thermistor_temp, thermocouple_temp; + int thermistor_pin, thermocouple_pin; // User input for pins A0 and A1 - // User input for pins A0 and A1 - int thermistor_pin, thermocouple_pin; printf("Enter values for thermistor pin, thermocouple pin: "); scanf("%d %d", &thermistor_pin, &thermocouple_pin); @@ -28,7 +26,7 @@ int main() thermistor_temp = kelvin_to_c(resistance_to_temperature(voltage_to_resistance(adc_to_voltage(v_ref, thermistor_pin)))); // Calculate thermocouple temperature in degrees C ( Part c, i - iv) - e_rc = 1000*voltage_to_erc(adc_to_voltage(v_ref, thermistor_pin)); + e_rc = 1000*voltage_to_erc(adc_to_voltage(v_ref, thermistor_pin)); // convert to millivolts e_comp = NISTdegCtoMilliVoltsKtype(thermistor_temp); thermocouple_temp = NISTmilliVoltsToDegCKtype(e_rc + e_comp);