Except I finished writing my paper as well as changing its format, I also figured out the code for the winch system. Like what I wrote in my paper, I mapped the value of the sleeping cycle to the ups and downs of the fragments, controlled by how many rotations were processed by the winch system. Hence, in Arduino, I created a list of an array of the rotation (line 13) and let the motor follow the array. In this way, although it seems random, the moving pattern is logic and follows the sleeping cycle.