Lookdown2 not working!


+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232

    Default Lookdown2 not working!

    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.

    Code:
        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,238_      '32               
        ,241,245,248,251,254,257,260,261,267,270,273_ 
        ,276,279,282,285,289,292,295,298,301,304,307,311,314,317,320_                    
        ,323,326,329,333,336,339,340,345,348,351,354,358,364,367,370], Humidity
    I can’t find any problem with the lookdown2 module and it compiles just fine. Comments please.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Lookdown2 not working!

    lookdown2 Volt_humid, <[128,132,135,138,141,144,147,150,154,157,160_ ..............
    is what i would use
    Warning I'm not a teacher

  3. #3
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: Lookdown2 not working!

    Thanks Richard, I'll give it a try. You got me! AF
    Last edited by MOUNTAIN747; - 2nd April 2025 at 03:44.

  4. #4
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: Lookdown2 not working!

    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

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Lookdown2 not working!

    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
    Last edited by richard; - 3rd April 2025 at 06:34.
    Warning I'm not a teacher

  6. #6
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: Lookdown2 not working!

    no paranoia here, just looking for a good laugh. And the world turns!

Similar Threads

  1. condition not working
    By hell_pk in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd April 2012, 10:17
  2. SERIN Not Working, SEROUT Working
    By cc1984 in forum Serial
    Replies: 11
    Last Post: - 26th October 2010, 19:16
  3. Lookup2 & Lookdown2
    By saladlee in forum Serial
    Replies: 1
    Last Post: - 4th February 2008, 20:41
  4. TMR2 not working..
    By sirvo in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 2nd August 2007, 23:17
  5. LookDown2 question
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th February 2006, 23:17

Members who have read this thread : 14

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