SunFounder PiDog Kit, Release 1.0
like pidog\examples. After modifying the code, you can run it directly to see the effect.
#!/usr/bin/env python3
from pidog import Pidog
from time import sleep
from preset_actions import pushup, bark
my_dog = Pidog()
sleep(0.5)
def main():
my_dog.legs_move([[45, -25, -45, 25, 80, 70, -80, -70]], speed=90)
my_dog.head_move([[0, 0, -20]], speed=90)
my_dog.wait_all_done()
sleep(0.2)
bark(my_dog, [0, 0, -20])
sleep(0.1)
bark(my_dog, [0, 0, -20])
sleep(1)
while True:
pushup(my_dog)
bark(my_dog, [0, 0, -40])
sleep(0.4)
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
my_dog.close()
2.2.10 Howling
PiDog is not only a cute puppy, but also a mighty dog. Come hear it howl!
Run the Code
cd /home/pi/pidog/examples
sudo python3 9_howling.py
After the program runs, PiDog will sit on the ground and howl.
Code
Note: You can Modify/Reset/Copy/Run/Stop the code below. But before that, you need to go to source code path
like pidog\examples. After modifying the code, you can run it directly to see the effect.
2.2. Funny Project 61