Raspberry Pi Pico practice problem · Raspberry Pi Pico
Plant waterer
HardBudget $27MicroPython
A potentiometer stands in for a soil-moisture sensor on GP26; a pump on VBUS is switched by a relay on GP13.
- reading below 30 %: pump on,
- above 70 %: pump off,
- in between: keep going as it was.
The test starts dry (20 %), moves to 50 % (the pump must keep running), then to 80 % (off), then back to 50 % (it must stay off).