Input signal - change variable function at time t

Hi everyone,

I’m dealing with differential equations with additional variable function i(t) which is a signal input that is on and off and then on. I don’t know how to integrate this into my function

function twosystem(du, u, p, t)
du[1] = (1 / ta) * (i(t) - u[1]) - b * u[2]
du[2] = (1 / tw) * (u[1] - u[2])

Example 3 at Ordinary Differential Equations · DifferentialEquations.jl