Soil Sensor - I²C Capacitive Moisture Sensor

I have a Adafruit Soil Sensor - I²C Capacitive Moisture Sensor

The Capacitive value should be between 0 and 2000

I am getting the correct measurement on my seeed xiao.

Does anyone see anything in the code below that would be causing this reading issue with particle?

#include "Adafruit_Seesaw.h"

Adafruit_Seesaw ss;

void setup()

  while (!Serial)

  Serial.println("seesaw Soil Sensor example!");

  if (!ss.begin(0x36))
    Serial.println("ERROR! seesaw not found");
    while (1)
    Serial.print("seesaw started! version: ");
    Serial.println(ss.getVersion(), HEX);

int last_x = 0, last_y = 0;

void loop()
  uint16_t tempC = ss.getTemp();
  uint16_t capread = ss.touchRead();

  Serial.print("Temperature: ");
  Serial.print("Capacitive: ");

below is the serial monitor results

Capacitive: 65535
Temperature: 26*C

Link to sensor –
Adafruit STEMMA Soil Sensor - I2C Capacitive Moisture Sensor : ID 4026 : $7.50 : Adafruit Industries, Unique & fun DIY electronics and kits

@bbarr7iot, tempC is declared as an uint16_t but the getTemp() function returns a float. Change the declaration and try it again to see if it works or at least what value is “truly” returned.

1 Like

I got it working with the code below, can you update the library when searching for seesaw.

@bbarr7iot, what did you change to get it working?

1 Like

Did you need Adafruit_I2CDevice library if you didn’t call it?
Did you alter the Adafruit_Seesaw library?

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