Heltec CubeCell Dev Board Plus with VH400 (ADC2)

Hi, I’m trying to use a VH400 soil moisture sensor on a Dev Board Plus. I’m using ADC2 and was wondering if I need any additional math to happen to get reasonable results. I’m asking because some people mentioned dividing voltage by 2 for correct results, other by 1023 or 4095.

The setup for an Arduino One is to connect it to a ADC port and divide by 1023.

We have made an update and have detailed instructions. You can refer to it.

Excellent, thank you!

Could you please elaborate on the 2.4kV maximum? Where can I get that as a reference voltage?

The ADC maximum input voltage of CubeCell Dev Board Plus is 2.4V. The value returned by analogRead() is the ADC level, and the value returned by analogReadmV() is mV.

Thank you, I figured that out based on the example posted by @navi. I’m currently struggling to work with a potentiometer which has a resistance between 0 and 2k. What is a good source on the board to get the 2.4 voltage?

You can use resistors to divide the voltage.