PDA

View Full Version : Lookdown2 not working!



MOUNTAIN747
- 2nd April 2025, 00:11
The HIH-4000 Humidity Sensors has an output voltage which must be referenced to percent humidity. My DS2438 is reading the voltage output of the humidity sensor. I then need to use a lookdown table to determine the humidity. I have verified the voltage (Volt_humid var word) is a good number going into the lookdown2 module. The problem is that I get “0” on the output of the Lookdown2 (Humidity var word). The table starts at 128 = 15% humidity.



lookdown2 Volt_humid, >[128,132,135,138,141,144,147,150,154,157,160_
,163,166,169,172,176,179,182,185,188,191,194,198_
,201,204,207,210,213,216,220,223,226,229,232,235,2 38_ '32
,241,245,248,251,254,257,260,261,267,270,273_
,276,279,282,285,289,292,295,298,301,304,307,311,3 14,317,320_
,323,326,329,333,336,339,340,345,348,351,354,358,3 64,367,370], Humidity


I can’t find any problem with the lookdown2 module and it compiles just fine. Comments please.

richard
- 2nd April 2025, 01:03
lookdown2 Volt_humid, <[128,132,135,138,141,144,147,150,154,157,160_ ..............
is what i would use

MOUNTAIN747
- 2nd April 2025, 03:36
Thanks Richard, I'll give it a try. You got me! AF

MOUNTAIN747
- 2nd April 2025, 13:56
OK, the jokes on me. You were not trying to pull one on April fools day. Your reply was Volt_humid, <[128, ...... which seemed that it's looking for a number smaller than the search number, which would almost always return an index of "0".

Reference Manual example says - lookdown2 W0,>[number, number, number.... This will not work. I tried everything I could think of to make this work, no luck.

When I reversed to less than (<) it gives me the index number of the next larger number than the search number. This means the statement says my search number is smaller or less than the number in the list so pick the next larger number and return that index number.

you are right as always Richard, on this second day of April.

Wayne

richard
- 3rd April 2025, 06:30
OK, the jokes on me.

looks like trumpian xenophobic paranoia might be setting in , downunder af day was long past when i posted [gst+11] it was 11.03 am april 2

MOUNTAIN747
- 3rd April 2025, 19:09
no paranoia here, just looking for a good laugh. And the world turns!