Have you used MMM-Swipe module. It uses two ultrasonic sensors to detectr right and left motions, I found it quite easy and straightforward