2

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.

2
  • You need a short delay between analog reads, more about it here: quora.com/…
    – Nino
    Jul 18, 2021 at 15:10
  • @Nino Thank you. That would explain it! (Add it as answer and I mark it as solution.)
    – MeSo2
    Jul 18, 2021 at 15:23

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.