Arduino UNO R4 WiFi ADC Resolution

Learn how to change the ADC resolution on the UNO R4 WiFi.

In this tutorial you will learn how to change the analog-to-digital converter (ADC) on an Arduino UNO R4 WiFi board. By default, the resolution is set to 10-bit, which can be updated to both 12-bit (0-4096) and 14-bit (0-16383) resolutions for improved accuracy on analog readings.

Goals

The goals of this tutorials are:

  • Update the ADC resolution to 12/14-bit.

Hardware & Software Needed

Analog-to-Digital Converter (ADC)

An analog-to-digital converter (ADC) transforms an analog signal to a digital one. The standard resolution on Arduino boards is set to 10-bit (0-1023). The UNO R4 WiFi supports up to 14-bit resolutions, which can provide a more precise value from analog signals.

To update the resolution, you will only need to use the analogReadResolution() command.

To use it, simply include it in your

setup()
, and use
analogRead()
to retrieve a value from an analog pin.

1void setup(){
2 analogReadResolution(14); //change to 14-bit resolution
3}
4
5void loop(){
6 int reading = analogRead(A3); // returns a value between 0-16383
7}

Summary

This short tutorial show how to update the resolution for your ADC, a new feature available on the UNO R4 WiFi board.

Suggest changes

The content on docs.arduino.cc is facilitated through a public GitHub repository. If you see anything wrong, you can edit this page here.

License

The Arduino documentation is licensed under the Creative Commons Attribution-Share Alike 4.0 license.