M5Stack 4 Relay controller

I have 4 24v solenoid valve that control an irrigation system. The controller has failed the M5Stack relay Controller appeared in a deal list, seeing i2c and the relay specs impulse buy made. Having looked for python code to use with a spare Rpi quickly discovered that it doesn’t exist :( .
Is there a way of being able to switch one relay on (sending 24v dc to one of the solenoid valves until switched off). The code would need to switch each solenoid valve on for a period of minutes then off in turn then sleep for a period of time (usually 24hrs.

Seems to be three options:

  1. write something in an RPi language if it is possible.
  2. get an Arduino board or emulator and link that to the Rpi and M5Stack module
  3. Cancel the order and look for an alternative.

I am a novice at writing code but have managed to get a cambot working using i2c components which came with set up code.

Help, ideas, or observations will be gratefully received!!

Yeah, its meant to be used with an M5 Core module.
Might be tricky getting it to work with a Pico or Pi?
There is some info here on i2c if you scroll down far enough.
Way above my skill level I’m thinking?
STM32F030x4/x6/x8/xC and STM32F070x6/xB advanced ARM®-based 32-bit MCUs - Reference manual

Thanks, It does look more complex than I am confident with. Need to talk to a pirate early tomorrow!!

Digging further it may be that with the right base it would do what I am looking for perhaps setting it up via windows.