We introduce a simple approach to segment in homogeneous phases a long-duration record of locomotion data consisting of body segment acceleration and foot pressure information only. The association of acceleration norms with impact detections allows us to successfully apply K-means algorithm in order to automatically classify the locomotion in terms of walking and various running speeds. The method is validated on experimental data. One subject, equipped with IMUs and foot pressure units is asked to successively walk and run around an indoor running track. The algorithm is able to detect the different types of motions.