• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

How to set the prescale for ADC1?, I would like to set prescale for ADC1 and what is specification prescale ADC1.

Q&A Forum › How to set the prescale for ADC1?, I would like to set prescale for ADC1 and what is specification prescale ADC1.
0 Vote Up Vote Down
Apisit Mitpitak asked 7 years ago
3 Answers
0 Vote Up Vote Down
Apisit Mitpitak answered 7 years ago

How to set the prescale for ADC1?, I would like to set prescale for ADC1 and what is specification prescale ADC1.

0 Vote Up Vote Down
Sara Santos Staff answered 7 years ago

Hi.
By default the analogRead() functions returns values between 0 and 4095 (it is 12 bit resolution).
To change the resolution you can use the analogReadResolution() function that accepts as argument a number between 1 and 16.
For example, if you want to get values between 0 and 1023, you pass 10 as argument (10 bit resolution).
If you want to get values between 0 and 255, you pass 8 as argument (8 bit resolution), and so on…
You can find more useful information about analog reading in the following link:
https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-adc.h
I hope this helps,
Regards,
Sara

0 Vote Up Vote Down
Apisit Mitpitak answered 7 years ago

Thanks a lot my teacher. 🙂

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.