Incorrect Soil Sensor value


#1

Hello there :smile:
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)


#2

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 and analog input pin documentation pages have additional information, including β€œturning on a pullup will affect the values reported by analogRead().”


Sequences, Pin Information, Status
#3

Thanks Gabriel!
I will remove the INPUT PULLUP first :slight_smile: