Has anyone noticed that if calling analogRead()
in a consecutive way that the value drops by a bit as opposed to just doing a single read?
And is this to be expected?
I am using a Seeeduino XIAO.
-
You need a short delay between analog reads, more about it here: quora.com/…Nino– Nino2021年07月18日 15:10:31 +00:00Commented Jul 18, 2021 at 15:10
-
@Nino Thank you. That would explain it! (Add it as answer and I mark it as solution.)MeSo2– MeSo22021年07月18日 15:23:30 +00:00Commented Jul 18, 2021 at 15:23
1 Answer 1
You need a short delay between analog reads due to the time it takes to complete a reliable ADC reading. In depth technical explanations can be found here, note that it refers to AVR architecture.