Skip to content

Include Nano 33 and Portenta #791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 21, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: analogReadResolution()
categories: [ "Functions" ]
subCategories: [ "Zero, Due & MKR Family" ]
subCategories: [ "Zero, Due, MKR family, Nano 33 (BLE and IoT) and Portenta" ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would cause the page to no longer be published at https://www.arduino.cc/reference/en/:


VirtualBox_Ubuntu_20_10_2020_16_58_01


The reason is because no subcategory of this name has been defined. One could be defined, but I think it's not a sustainable strategy to continuously append board names as needed.

Better would be to change to a non-board specific category name. I would prefer to just move the analogReadResolution() and analogWriteResolution() reference pages to the "Analog I/O" subcategory, then make sure the reference pages are very clear about which boards support these functions.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes a lot of sense, Per
I don't know how such content is organised, and I'm glad you posted your feedback 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the category change and will post it as another PR

---


Expand All @@ -16,11 +16,12 @@ subCategories: [ "Zero, Due & MKR Family" ]

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

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.

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.
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.
The Portenta H7 has a 16 bit ADC, which will allow values between 0 and 65535.
[%hardbreaks]


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

[float]
=== Parameters
`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.
`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 10,12 or 16 bits, but values returned by `analogRead()` will suffer approximation. See the note below for details.


[float]
Expand Down