How do I compare two temperatures


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    You beat me to it.

    I use a similar process for monitoring the temperatures in my Vivariums, and sounding an alarm if they exceed a set range. Basically

    Code:
    IF Temperature >  alarmhigh  then AlarmPin = 1
    IF Temperature <  alarmlow  then AlarmPin = 1
    The variables used are word type so in my code for the thermostat 23.6C would be stored as 236. Likewise a high threshold would be 350 (35.0c)

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    IF Temperature > alarmhigh then AlarmPin = 1
    IF Temperature < alarmlow then AlarmPin = 1
    Malcom, you have a typo in your two lines of code!

    Al.
    All progress began with an idea

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts