# Incorrect Soil Sensor value

**URL:** <https://forum.farmbot.org/t/incorrect-soil-sensor-value/2785>\
**Category:** Arduino\
**Created:** [October 27, 2017, 4:31pm UTC](https://forum.farmbot.org/t/incorrect-soil-sensor-value/2785 "2017-10-27T16:31:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeHou](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/j/bb73d2/32.png) [@JoeHou](https://forum.farmbot.org/u/JoeHou)\
**Post date:** [October 27, 2017, 4:31pm UTC](https://forum.farmbot.org/t/incorrect-soil-sensor-value/2785/1 "2017-10-27T16:31:27Z")

</div>

Hello there 😄  
My Soil Sensor work abnormal when I use the Farmbot Arduino v4.0.0  
\*\*UART command “F42 P5 M1” --\> always return “R41 V987 Q0”

After I traced it and found below code in farmbot\_arduino\_controller.cpp  
**pinMode(UTM\_D, INPUT\_PULLUP);**

I remove it and the Soil Sensor return value is correctly.  
Is it a bug?

Thanks!  
FBTUG(Taiwan)

---

<div class="post-metadata">

**Author:** ![Gabriel](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/g/9de0a6/32.png) [@Gabriel](https://forum.farmbot.org/u/Gabriel)\
**Post date:** [October 27, 2017, 5:16pm UTC](https://forum.farmbot.org/t/incorrect-soil-sensor-value/2785/2 "2017-10-27T17:16:57Z")

</div>

`INPUT_PULLUP` is used for all input pins to increase reading reliability and attempt to decrease damage due to wiring mishaps. The Aduino [digital pin documentation](https://www.arduino.cc/en/Tutorial/DigitalPins) and [analog input pin documentation](https://www.arduino.cc/en/Tutorial/AnalogInputPins) pages have additional information, including “turning on a pullup will affect the values reported by analogRead().”

---

<div class="post-metadata">

**Author:** ![JoeHou](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/j/bb73d2/32.png) [@JoeHou](https://forum.farmbot.org/u/JoeHou)\
**Post date:** [October 28, 2017, 3:06am UTC](https://forum.farmbot.org/t/incorrect-soil-sensor-value/2785/3 "2017-10-28T03:06:08Z")

</div>

Thanks Gabriel!  
I will remove the INPUT PULLUP first 🙂
