# Simplified MicroPython code for soil moisture reading
from machine import Pin, ADC
import time
potentiometer_pin = Pin(27)
soil_sensor = ADC(potentiometer_pin)
threshold_moisture = 100
while True:
moisture_level = soil_sensor.read_u16()
print(moisture_level)
if moisture_level < threshold_moisture:
print("Soil is dry. Water your plant!")
else:
print("Soil moisture is optimal.")
time.sleep(3600) # Check every hour