PyRaspBeta

← All practice problems

Raspberry Pi practice problem · Sensors

Soil check

EasyBudget $14Python · gpiozero

A capacitive soil moisture sensor (powered from 3.3 V) with its AOUT on input A0 of an ADS1115 ADC on the I²C pins (ADDR to ground → address 0x48). Every second, print one word from the probe's voltage:

VoltagePrint
above 2.2 VDRY
1.6 V to 2.2 VOK
below 1.6 VWET

Wetter soil gives a lower voltage. The test starts dry, waters the pot to medium at 4 s and soaks it at 8 s.

Tip: AnalogIn(ADS1115(board.I2C()), ads1x15.Pin.A0).voltage from adafruit_ads1x15.

More in Sensors