I am planning a project that uses the BBC Micro Bit, the Sparkfun Weather Bit, the Sparkfun Soil Moisture Sensor (with screw terminals), Sparkfun Waterproof Soil Temperature Sensor, and the Sparkfun 12" M/M Jumper Wires.
My plan is to use the Weather Bit to provide data (air pressure, humidity, altitude, air temp, soil moisture, and soil temp) to the Micro Bit, which will log data every 30 minutes.
I am coding on Microsoft Makecode using blocks. To help slow down corrosion on the moisture sensor, I only want the system to provide power every 30 minutes, when the data is being logged, to the soil moisture sensor instead of powering it continuously. I need help configuring the code (shown in the pictures) and the connection between the moisture sensor and the Weather Bit to help solve the problem. Can you help me with this?
Picture of code: