Hello Group.
I'm new to the Picaxe chip and want to build a simple project which compares two temperatures using two DS18B20 sensors. The issue is to start a fan which would assist a marine refrigerator when the outside temperature is cooler than the inside of the refrigerator. The fan would simply circulate colder, outside air through the refer.
In term of Celsius, it would be comparing something between 1 and 4 degrees C. As I understand it, the DS18B20 reads or "outputs" in terms of Celsius.
I don't need any LCD displays in this project and so the issue of dealing with a readout display is not important. But if I set up two variables to place the "readtemp" inputs, will the variables be integers representing the temperature? Or do I need to do some conversion math to the variable to create a meaningful number for comparison?
In other words, I was hoping I could have a couple of commands: "readtemp 2, b2" and "readtemp 4, b3" followed later by a command: "IF b3 <= b2 goto fanon". My concern is that the numbers being placed in variables b2 and b3 would not be so meaningful for comparison if they weren't simple integers.
Sorry this is so verbose. Thanks for any help out there.
ps: I'll work on the problem of "below freezing" later....
Gene Darby
I'm new to the Picaxe chip and want to build a simple project which compares two temperatures using two DS18B20 sensors. The issue is to start a fan which would assist a marine refrigerator when the outside temperature is cooler than the inside of the refrigerator. The fan would simply circulate colder, outside air through the refer.
In term of Celsius, it would be comparing something between 1 and 4 degrees C. As I understand it, the DS18B20 reads or "outputs" in terms of Celsius.
I don't need any LCD displays in this project and so the issue of dealing with a readout display is not important. But if I set up two variables to place the "readtemp" inputs, will the variables be integers representing the temperature? Or do I need to do some conversion math to the variable to create a meaningful number for comparison?
In other words, I was hoping I could have a couple of commands: "readtemp 2, b2" and "readtemp 4, b3" followed later by a command: "IF b3 <= b2 goto fanon". My concern is that the numbers being placed in variables b2 and b3 would not be so meaningful for comparison if they weren't simple integers.
Sorry this is so verbose. Thanks for any help out there.
ps: I'll work on the problem of "below freezing" later....
Gene Darby