(* function which chooses elements from "lov" (list of values) *)
(* in a seqence according to current value of time "t" relatively to "t0" *)
(* "which" allows to specify the element component(s) to be returned *)
inputFun[t_,t0_,lov_,which_]:=Piecewise@@{Table[{lov[[i,which]],Mod[t,t0 Length[lov]]<t0 i},{i,Length[lov]}]}

(* EXAMPLES OF USAGE *)
(* the list of picewise constant values to be used in a sequence *)
values={{1,0},{2,1},{3,-1},{4,0},{5,-1},{6,0}};
(* the constant period *)
t0=0.2; 
inputFun[1.5,t0,values,{1,2}] (* let's check value at time t=1.5 *)
Plot[inputFun[t,t0,values,1],{t,0,2}] (* let's plot the first component *)
Plot[inputFun[t,t0,values,2],{t,0,2}] (* let's plot the second component *)

(* Simple system driven with the input function (picewise constant velocity) *)
sol=NDSolve[{x'[t]==inputFun[t,t0,values,2],x[0]==0},x,{t,0,2}];
Plot[x[t]/.sol,{t,0,2}]

(* As the above but not "all in one line" - variables introduced :) *)
eqns={x'[t]==u1,x[0]==0};
controls={u1->inputFun[t,t0,values,2]};
sol=NDSolve[eqns/.controls,x,{t,0,2}];
Plot[x[t]/.sol,{t,0,2}]