# hm1500lf.template - rhoffman # # Template file for using the HM1500LF humidity sensor with an analog voltage input # Device datasheet alleges the following linear relation between voltage and relative humidity: # RH = (0.03892 * V) - 42.017 # # Fields: # INPA - input link from analog input device in V # INPB - scalar provided from datasheet (x1000 since sheet uses mV) # INPC - constant offset provided by datasheet record(calc, $(DEV):HUMIDITY) { field(DESC, "relative humidity calculation") field(INPA, "$(INP)") field(INPB, "38.92") field(INPC, "42.017") field(CALC, "(A * B) - C") field(EGU, "% HUMIDITY") field(SCAN, "1 second") field(HIGH, "$(HIGH)") field(HIHI, "$(HIHI)") field(HOPR, "$(HOPR)") field(LOLO, "$(LOLO)") field(LOPR, "$(LOPR)") field(LOW, "$(LOW)") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(HSV, "MINOR") field(LSV, "MINOR") }