Read data to ntc10k Sensor

Hello. I have a problem with reach data to ntc10k temperature sensor on blynk.
I reach some data, but is completely wrong, and is no constant (i reach 30 degrees, a second later -20 degrees, for example)
There is my code. Honestly, I dont know what i do wrong…
Thank you so much for help :)))

#define BLYNK_TEMPLATE_ID "TMPL-3eq93fZ"
#define BLYNK_DEVICE_NAME "test"
#define BLYNK_AUTH_TOKEN "39aYTJHdg5kfgHYamwZL3siPqJl2Nrv_"


// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial


#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>



char auth[] = BLYNK_AUTH_TOKEN;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Tenda_11EB10";
char pass[] = "faraparola";

BlynkTimer timer;

// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V1, millis() / 1000);
}
void sensorDataSend()
{
  int ThermistorPin = 32;
  int Vo;
  float A = 10000;
  float logC, C, T ;
  float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;
  float c4 = 1.009249522e-03, c5 = 2.378405444e-04, c6 = 2.019202697e-07;

  Vo = analogRead(ThermistorPin);
  C = A * (1023.0 / (float)Vo - 1.0);
  logC = log(C);
  T = (1.0 / (c1 + c2*logC + c3*logC*logC*logC));
  T = T - 273.15;
  Blynk.virtualWrite(V1, T);
}
void setup()
{
  // Debug console
  Serial.begin(115200);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);

  // Setup a function to be called every second
  timer.setInterval(5000L, sensorDataSend);
}

void loop()
{
  Blynk.run();
  timer.run(); // Initiates BlynkTimer
}

@Eduard Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

I just want to check that you are actually using GPIO32 for your sensor as shown in your sketch. If you’d swapped this to one of these pins then the behaviour you describe would be expected…

  • GPIO 4
  • GPIO 0
  • GPIO 2
  • GPIO 15
  • GPIO 13
  • GPIO 12
  • GPIO 14
  • GPIO 27
  • GPIO 25
  • GPIO 26

If you are using GPIO32 then have you tried adding some serial print statements to your sketch to see what sort of values you are seeing from your sensor, and what effect your calculations are having on these values?

Pete.