Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Using ADC  #338

Closed
Closed
@fchanson

Description

@fchanson

Hi,

I made some tests on the ADC using a NodeMCU 0.9.5 build 20150318.
My code just reads the value on the pin every 500ms.

Using a Arduino program :

  • pin A0 at GND --> analogRead(A0) = 700
  • pin A0 at 3.3V --> analogRead(A0) = 909

I am surprised to have the value 700 when voltage on pin A0 is GND. Should be near 0.

I made the same test with a LUA program using ESPlorer.
The result is the following :

  • pin A0 at GND --> adc.read(0) = 4
  • pin A0 at 3.3V --> adc.read(0) = 1023

These last results sound good.

Does anyone have the same problem ?

Need something special to use the ADC pin ?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions