The screenshot of the Micro:bit program:
Explanation of the program code:
It detects in every 10 seconds
If the moisture level is lower than 900, it is considered to be dry.
The water pump operates for 3 seconds each time.