#include<SimpleKalmanFilter.h>//the ADC pin of esp32#define ADC_PIN 34// update Serial Ploter every 100ms#define UPDATE_TIME 100longcurrent;//init Kalman with params, you can modify params to make better resultSimpleKalmanFilterkalman(2,2,0.01);voidsetup(){Serial.begin(115200);Serial.print(0);// To freeze the lower limitSerial.print(" ");Serial.print(3.3);// To freeze the upper limitSerial.print(" ");}voidloop(){//to make demo interesting we add random noise to measurementfloatrand_noise=random(-100,100)/100.0;// Reading LDR value, ADC of esp32 0-4095 according to 0-3.3Vfloatmeasured_value=analogRead(ADC_PIN)/4095.0*3.3+rand_noise;//Kalman update estimatefloatestimated_value=kalman.updateEstimate(measured_value);//update plotterif(millis()>current){Serial.print(measured_value);Serial.print(",");Serial.print(estimated_value);Serial.println();current=millis()+UPDATE_TIME;}}