STM32F103xC and LM35 wrong readings
Hey, I'm trying to get some temperature readings from LM35 sensor and I'm using "blue pill" for this little project and of course ADC. The problem is that I am getting wrong readings, approximately half of the real value. I know that the sensor is good because I tested it with arduino nano and well it gave me right values.
void ADC()
{
error= HAL_ADC_Start(&hadc1);
if(error!=HAL_OK)
{
i=1;
}
error=HAL_ADC_PollForConversion(&hadc1,1);
if(error!=HAL_OK)
{
i=2;
}
i=3;
Adc_Value = HAL_ADC_GetValue(&hadc1);
Reiksme=(Adc_Value*3.3)/(4096*0.01);
HAL_Delay(1000);
}
here is my little function to get those values. Any ideas why it doesn't work on this mcu?
