I added methods that cause the servo hat to sleep or wake, which is useful if you want to preserve the life of your servos.
In my script that's creating an object from pi_servo_hat, it can now call pi_servo_hat.sleep() to put the hat to sleep while it's not being used. Using pi_servo_hat.wake() powers it up immediately.
Hi there, thanks for your contribution! This looks good to me, just had one minor issue with a return statement being in the wrong place, but I fixed that.
I added methods that cause the servo hat to sleep or wake, which is useful if you want to preserve the life of your servos.
In my script that's creating an object from pi_servo_hat, it can now call pi_servo_hat.sleep() to put the hat to sleep while it's not being used. Using pi_servo_hat.wake() powers it up immediately.