🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Analog Read gives wrong value.

    Atom
    2
    3
    4.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mwtheplumber
      last edited by

      I am running a sketch on an ATOM Lite using GPIO 33 as an analog read pin. When connected to 3.3V (which actually measures 3.18V) it gives 4095 as expected. If connected to GND it gives 0 as expected. However if the voltage on GPIO33 is 3.11V it still shows 4095.

      By my maths at 3.11V it should show 4004.

      Any help appreciated.

      1 Reply Last reply Reply Quote 0
      • R
        robalstona
        last edited by

        The adc readings is non linear at both ends of range (flat). So you can't measure voltage below ~0.17V and under ~3.15.
        Below is link with explain
        https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/

        1 Reply Last reply Reply Quote 1
        • M
          mwtheplumber
          last edited by

          Thank you very much for your reply. Very helpful.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post