Skip to content

readCelsius() returns bogus data on ESP32 #16

Description

@QuickyTank

My declaration;

#define SENSOR_PIN             NTC_PIN
#define REFERENCE_RESISTANCE   8000
#define NOMINAL_RESISTANCE     100000
#define NOMINAL_TEMPERATURE    25
#define B_VALUE                3950
#define ESP32_ANALOG_RESOLUTION 4095

// Global outside temperature reading
double outsidetemp;
Thermistor *thermistor; 
.
.
.
//read the thermistor to get outsidetemp
void ReadOutSideTemp(){
  digitalWrite(NTC_PWR_PIN, HIGH);    //provide power to NTC
  delay(1);
  outsidetemp = (thermistor->readCelsius())/6.0;  //tried dividing by 6 to get close number.
  digitalWrite(NTC_PWR_PIN, LOW);    //turn off the NTC power
}

Returns 83 for an outside temp of 14
Tried with removing the line #define ESP32_ANALOG_RESOLUTION 4095, no change.
Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions