Not smooth when moving sprite using accelerometer

I had the problem about accelerometer on cocos2d-x 2.2.6, In fact, there is a solution in other topic(Accelerometer data lagging), however, the solution is for cocos2d-x 3.x and later.
Any solution for cocos2d-x 2.2.6?
Thanks.

Try interpolating between values and make your sprite move with constant speed. This should make lagging of data unnoticeable.

Thank you for your reply, the same problem when I used your solution, I using moveby action as solution temporarily now.