• 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

Difference in math with ESP32 versus UNO

Q&A Forum › Category: ESP32 › Difference in math with ESP32 versus UNO
0 Vote Up Vote Down
davidrossi asked 6 years ago

I am moving from UNO to Adafruit HUZZAH32 ESP32.  I am having trouble understanding how to modify my code to deal with the 12-bit versus 10-bit floating point math.  Specifically, my Analog Read comes back with the larger number on the ESP32.  I understand it’s the difference between 1024 and 4096 steps in the voltage measurement from the sensor.  Is there some specific math I need to do?
 
Thanks

Question Tags: Arduino, ESP32, UNO
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi.
I’m sorry, but I didn’t understand your question.
In the ESP32, the analog read gives you a higher resolution. This means that an analog sensor will give values between 0 and 4096. If you do any calculations after getting the sensor readings, you need to keep in mind that the maximum value corresponds to a reading of 4096.
Let me know if this answers your question as I’m not sure if I understood your question.
Regards,
Sara

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

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition 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.