I tried the code below :
#include <Arduino.h>
uint8_t ADresolution = 1;
void setup()
{
Serial.begin(9600);
pinMode(P0_14, OUTPUT);
digitalWrite(P0_14, LOW);
// pinMode(P0_31, INPUT);
}
void loop()
{
unsigned int TempV = analogRead(P0_31); // Read AD to unsigned integer
float BatV = TempV * 510 / 1510 * ADresolution; // “Adresolution” must be define
Serial.print(TempV);
Serial.print(" ");
Serial.println(BatV);
delay(200);
}
It gives me :
4294967295 for TempV
2844348.00 dor BatV
I have no changes in the value even if i unplugged the li-po.
Maybe we need to activate something for the ADC ?