This is an example application for the Adafruit STEMMA Soil Sensor, an I2C-capable sensor that measures both moisture and temperature.
It is written and tested for v3.3 of the ESP-IDF environment, using the xtensa-esp32-elf toolchain (gcc version 5.2.0).
Ensure that submodules are cloned:
$ git clone --recursive https://github.com/Krzyshio/ESP32_Adafruit_STEMMA_Soil_Sensor_Example.git
Build the application with:
$ cd ESP32_Adafruit_STEMMA_Soil_Sensor_Example.git
$ idf.py menuconfig
$ idf.py build
$ idf.py -p (PORT) flash monitor
The program should detect your connected sensor and display readings on the console.
This application makes use of the following components (included as submodules):
- components/ESP32_Adafruit_STEMMA_Soil_Sensor
To run this example, connect the STEMMA Soil Sensor to two GPIOs on the ESP32 (I2C SDA and SCL).
This example demonstrates the use of the ESP32_Adafruit_STEMMA_Soil_Sensor component. It demonstrates:
- Sensor initialization.
- Reading of moisture and temperature.
- Error handling and reporting.
The code in this project is licensed under the MIT license - see LICENSE for details.
- Adafruit STEMMA Soil Sensor documentation
- Espressif IoT Development Framework for ESP32
- ESP32_Adafruit_STEMMA_Soil_Sensor
- "I2C" is a registered trademark of Phillips Corporation.
- "Adafruit" and "STEMMA" are trademarks of Adafruit Industries.