Dynamic measurement of the elastic constant of an helicoidal spring by a smartphone