f[x_]=1/2-Abs[x-Floor[x]-1/2]

Plot[f[x],{x,0,2}]

Manipulate[Plot[Table[Sum[2^(-k) f[2^k x],{k,0,l}],{l,0,n}],{x,0,1},ImageSize->600,PlotRange->{0,2/3}],{n,0,8,1}]