reference-en icon indicating copy to clipboard operation
reference-en copied to clipboard

Ambiguous wording in `analogReadResolution` note re: setting higher resolution than supported

Open TimMathias opened this issue 4 years ago • 3 comments

In the section "Notes and Warnings" there is ambiguous wording:

For example: using the Due with analogReadResolution(16) will give you an approximated 16-bit number with the first 12 bits containing the real ADC reading and the last 4 bits padded with zeros.

Consider revising it to:

For example: using the Due with analogReadResolution(16) will give you an approximated 16-bit number with the most significant 12 bits containing the real ADC reading and the least significant 4 bits padded with zeros.

This would make it consistent with the wording of the following paragraph:

If you set the analogReadResolution() value to a value lower than your board’s capabilities, the extra least significant bits read from the ADC will be discarded.

TimMathias avatar Sep 17 '20 20:09 TimMathias

@dcuartielles I agree with him. Shall I make the changes?

kengdahl avatar Sep 23 '20 12:09 kengdahl

@kengdahl and @dcuartielles, yes, go on, what are you waiting for?

TimMathias avatar Oct 03 '20 17:10 TimMathias

@TimMathias I was asking @dcuartielles about this. As soon as I get the ok from him I'll gladly make the changes.

kengdahl avatar Oct 08 '20 13:10 kengdahl