hello everyone. i have arduino mega, nextion display, and max6675 thermocouple. also i have a slider on my display to set a temperature value. my goal is to compare temperature read value and set value so i can open/close my relay in order to result of comparison. i have checked the usage of "if" command and i think im using it in the right way.
And my relay is working i have tried to make it work with only thermocouple in another sketch. i have assigned an integer constant value for setting temperature when i heat the sensor, relay was openning and when i cool the sensor it was closing.
So i have to do this process on a variable set value not a constant. ill change the set value on display and ,i'll control relay according to this set value.
im using
float temp
temp=thermocouple.ReadCelsius()
temp value is perfectly displayed on the screen
for the slider value
uint32_t number2 = 0
h0.getValue(&number2)
i cant compare temp and number2. Please help me. Thank you very much.
tez_deneme_27.05_20.53.ino (1.95 KB)