sparkfun / PiServoHat_Py

Python package for the Pi Sevo Hat
MIT License
3 stars 2 forks source link

Update pi_servo_hat.py #7

Closed BarryAbrams closed 4 months ago

BarryAbrams commented 1 year ago

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.

sfe-SparkFro commented 4 months ago

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.