void setup() {
Serial.begin(115200);
pinMode(A2, INPUT);
}
void loop() {
static int adw_alt = -42, adw;
static float U, Temp;
adw = analogRead(A2);
if( abs( adw_alt - adw ) > 3 )
{
U = 5.0 * adw / 1.023 ;
Temp = (U - 500) / 10.0 ;
adw_alt = adw;
Serial.print("ADW = " + String( adw ) + ": ");
Serial.print( U, 1 );
Serial.print(" mV = " );
Serial.print( Temp, 1 );
Serial.println( "°C ") ;
delay(100);
}
}