Incorrect Soil Sensor value

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

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


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().”

1 Like

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