From e1631da36d6bb7ff14dc3c9a97ee6dd6fe8b7ef7 Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Thu, 12 Oct 2023 17:25:54 +0100 Subject: [PATCH] rename skeleton to name with initials --- Lab_1/{TwoSensorsSkeleton.c => TwoSensorsAAR.c} | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) rename Lab_1/{TwoSensorsSkeleton.c => TwoSensorsAAR.c} (94%) 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);