Comparison of two analog values

Hi guys,

iam very new here... and my question might sound stupid ... but i really need your help :slight_smile:
additionaly i don´t even know if my idea is realizable ...

for a my measurement i want to measure a analog value. the next step would be to measure another value. in the end i would like to compare them and print them to my serial monitor.

my problem is now how to interrupt the measurement ? .... i need some time between both measurements which should not influence the result.

my first idea was like: recording a defined amount of values and and save them to the eeprom. afterwards the same procedure with the second measurement. ok and the last step would be to read out the mean of both measurements and compare them ?

hopefully anyone get my problem ... would be super glad if someone could help me !!!
greetings kohlmeise

Quick and dirty and not the best way to do it, but it will show you the principle and also give you a chance to explain why you think you need a complicated solution using the EEPROM

read the first value and save it to a variable
delay() for a while
read the second value and save it to a second variable
take action depending on the comparison of the two values