A module to handle pendulum movements