Welcome! Log In Create A New Profile

Advanced

Thermistor.h

Posted by Giuseppe 
Thermistor.h
May 24, 2010 05:07AM
I have modify the file Thermistor.h present in directory Extruder Controller but this is not called from any procedure.
So the repstrap-commtest.py not working.
In repstrap-commtest.py call the function 91 but i not see this function defined in extrudercontroller.pde
Can help me?
Re: Thermistor.h
May 24, 2010 05:55AM
Hi Giuseppe,

take a look at Heater.h line 124:

    virtual int read_thermistor()
    {
      int raw = sample_temperature(thermistor_pin);
    
      int celsius = 0;
      char i;
    
      for (i=1; i raw)
        {
          celsius  = temptable[i-1][1] + 
            (raw - temptable[i-1][0]) * 
            (temptable[1] - temptable[i-1][1]) /
            (temptable[0] - temptable[i-1][0]);
    
          if (celsius > 300)
            celsius = 300; 
    
          break;
        }
      }
    
      // Overflow: We just clamp to 0 degrees celsius
      if (i == NUMTEMPS)
        celsius = 0;
    
      return celsius;
    }
Sorry, only registered users may post in this forum.

Click here to login