# Internal PULLDOWN

**URL:** <https://community.particle.io/t/internal-pulldown/13955>\
**Category:** Firmware\
**Created:** [July 30, 2015, 10:16am UTC](https://community.particle.io/t/internal-pulldown/13955 "2015-07-30T10:16:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sherkann](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Sherkann](https://community.particle.io/u/Sherkann)\
**Post date:** [July 30, 2015, 10:16am UTC](https://community.particle.io/t/internal-pulldown/13955/1 "2015-07-30T10:16:50Z")

</div>

Hello everybody

I try to read analog value with the sparkcore but I can not get the zero value when nothing it’s connected.

My code is very simple :

```auto
include "application.h"
int value;

void setup()
{
  pinMode(A0, INPUT_PULLDOWN);
  Serial.begin(9600);
}
void loop()
{
  value=analogRead(A0);
  Serial.println(String(value));
  delay(1000);
}

```

someone there an idea why it does not work ?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [July 30, 2015, 10:50am UTC](https://community.particle.io/t/internal-pulldown/13955/2 "2015-07-30T10:50:19Z")

</div>

Please do not cross-post in other threads and open a new one.

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [July 30, 2015, 11:52am UTC](https://community.particle.io/t/internal-pulldown/13955/3 "2015-07-30T11:52:30Z")

</div>

@Sherkann, I agree with @kennethlimcp. Please see my response on the other thread:

> [@Internal pull-up resistor?\[SOLVED\]](https://community.particle.io/t/internal-pull-up-resistor-solved/1392/7):
>
> @Sherkann, setting the pinMode() prior to analog input has no affect since the pin is set to INPUT (floating) by the function. Reading a floating (unconnected) analog input will give you a random value due to noise on the pin. Connecting the pin to GND or 3V3 will produce zero and 4095 respectively and as expected. You can use external pull-up or pull-down resistors as required. smiley

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [July 30, 2015, 1:52pm UTC](https://community.particle.io/t/internal-pulldown/13955/4 "2015-07-30T13:52:45Z")

</div>

This topic was automatically closed 113 minutes after the last reply. New replies are no longer allowed.
