From 6b9607f7cace8a7c28e9dc3b575e5e4d39b5ded8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20Hyl=C3=A9n?= Date: Thu, 13 Jul 2023 09:40:58 +0200 Subject: [PATCH 1/2] Update ADC range ADC guide --- .../uno-r4-minima/tutorials/adc-resolution/adc-resolution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/hardware/02.hero/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md b/content/hardware/02.hero/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md index 6aef915f6f..826399b71c 100644 --- a/content/hardware/02.hero/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md +++ b/content/hardware/02.hero/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md @@ -7,7 +7,7 @@ tags: author: 'Karl Söderby' --- -In this tutorial you will learn how to change the analog-to-digital converter (ADC) on an **Arduino UNO R4 Minima** board. By default, the resolution is set to 10-bit, which can be updated to both 12-bit (0-4096) and 14-bit (0-65355) resolutions for improved accuracy on analog readings. +In this tutorial you will learn how to change the analog-to-digital converter (ADC) on an **Arduino UNO R4 Minima** 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 @@ -35,7 +35,7 @@ void setup(){ } void loop(){ - int reading = analogRead(A3); // returns a value between 0-65355 + int reading = analogRead(A3); // returns a value between 0-16383 } ``` From 3b77cbd78c3a64ddf91e56e0eecaf7ffdfe5101c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20Hyl=C3=A9n?= Date: Thu, 13 Jul 2023 09:46:45 +0200 Subject: [PATCH 2/2] Update adc-resolution.md --- .../uno-r4-minima/tutorials/adc-resolution/adc-resolution.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/hardware/02.hero/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md b/content/hardware/02.hero/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md index 826399b71c..08fddc8e20 100644 --- a/content/hardware/02.hero/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md +++ b/content/hardware/02.hero/boards/uno-r4-minima/tutorials/adc-resolution/adc-resolution.md @@ -29,6 +29,7 @@ To update the resolution, you will only need to use the [analogReadResolution()] To use it, simply include it in your `setup()`, and use `analogRead()` to retrieve a value from an analog pin. + ```arduino void setup(){ analogReadResolution(14); //change to 14-bit resolution