Menu

Working on an lm 35 temp sensor

Judah Ben
2019-11-19
2019-12-06
<< < 1 2 3 (Page 3 of 3)
  • mmotte

    mmotte - 2019-11-28

    Judah,
    First, when saying "it don't work", be specific about what you thought should happen and what actually happened.

    Put a .1uf cap very near the power pins of the PIC.

    It looks like you have a 1X20 LCD.

      main:
          do forever
    
              dim tempnow as Word
              tempnow=scale(ReadAD10(AN4),0,1023,0,499)
    
          count=0
    
    
              if tempold<>tempnow then
                cls
                print tempnow
                print " degrees C"
                locate 1,0
                print "Atmospheric temp"
    
                tempold=tempnow
                ccount++
              end if
    

    1) " dim tempnow as Word" should be above Main in the initialization section.
    2) You use locate before Printing in your subroutines, why ins't there a locate for the first Print? Also all the Degrees C and atmospheric temp are using your valuable LCD screen space. Wouldn't just a "C" or "Deg C" be enough?
    3) What do "count " and "ccount" do? Lose them if they have no purpose.

    Start with these.

    Mike

     
  • Judah Ben

    Judah Ben - 2019-12-06

    Pls may I ask that this thread not be closed.
    I was victim of theft of my devices (I logged in through someone's).
    I should hopefully bounce back by the start of next year.

     
<< < 1 2 3 (Page 3 of 3)

Log in to post a comment.