Skip to content

Commit 5c6f13a

Browse files
ubidefeoper1234
andauthored
Include Nano 33 and Portenta (#791)
* Include Nano 33 and Portenta These boards are lacking in this piece of documentation, possibly elsewhere * Update Language/Functions/Zero, Due, MKR Family/analogReadResolution.adoc Co-authored-by: per1234 <accounts@perglass.com> * Update Language/Functions/Zero, Due, MKR Family/analogReadResolution.adoc Yes! I just discovered that such method is not available and throws an error. I believe it should be added to cores which do not support multiple resolutions, just in case a user obtains a sketch made on an *arm* board and the compilation error makes no sense to them. The method could be just a sinkhole but would prevent the compile error :) Co-authored-by: per1234 <accounts@perglass.com> * changed subcategory to "Analog I/O" * Sub-category changed back to "Zero, Due & MKR Family" In order to submit a new PR with just the category change Co-authored-by: per1234 <accounts@perglass.com>
1 parent b26ac38 commit 5c6f13a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Language/Functions/Zero, Due, MKR Family/analogReadResolution.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ subCategories: [ "Zero, Due & MKR Family" ]
1616

1717
[float]
1818
=== Description
19-
analogReadResolution() is an extension of the Analog API for the Arduino Due, Zero and MKR Family.
19+
analogReadResolution() is an extension of the Analog API for the Zero, Due, MKR family, Nano 33 (BLE and IoT) and Portenta.
2020

2121
Sets the size (in bits) of the value returned by `analogRead()`. It defaults to 10 bits (returns values between 0-1023) for backward compatibility with AVR based boards.
2222

23-
The *Due, Zero and MKR Family* boards have 12-bit ADC capabilities that can be accessed by changing the resolution to 12. This will return values from `analogRead()` between 0 and 4095.
23+
The *Zero, Due, MKR family and Nano 33 (BLE and IoT)* boards have 12-bit ADC capabilities that can be accessed by changing the resolution to 12. This will return values from `analogRead()` between 0 and 4095. +
24+
The *Portenta H7* has a 16 bit ADC, which will allow values between 0 and 65535.
2425
[%hardbreaks]
2526

2627

@@ -31,7 +32,7 @@ The *Due, Zero and MKR Family* boards have 12-bit ADC capabilities that can be a
3132

3233
[float]
3334
=== Parameters
34-
`bits`: determines the resolution (in bits) of the value returned by the `analogRead()` function. You can set this between 1 and 32. You can set resolutions higher than 12 but values returned by `analogRead()` will suffer approximation. See the note below for details.
35+
`bits`: determines the resolution (in bits) of the value returned by the `analogRead()` function. You can set this between 1 and 32. You can set resolutions higher than the supported 12 or 16 bits, but values returned by `analogRead()` will suffer approximation. See the note below for details.
3536

3637

3738
[float]

0 commit comments

Comments
 (0)