SunFounder pisloth
4.9 Custom Step
In the previous projects, we used a lot of actions that we wrote, so how are these actions composed and done? Generally
speaking, an action is composed of one or more steps.
In this project, we will learn how to customize PiSloth’s step.
Note: You can download and print the PDF Cartoon Mask for your PiSloth.
Run the Code
cd /home/pi/pisloth/examples
sudo python3 custom_step.py
Once the code has been run, press the following keys to adjust the angle of each servo of PiSloth.
• q: Increase the angle of the left leg
• w: Decrease the angle of the left leg
• z: Increase the angle of the left foot
• x: Decreases the angle of the left foot
• i: Increase the angle of the right leg
• o: decreases the angle of the right leg
• n: increases the angle of the right foot
• m: decreases the angle of the right foot
• SPACE: Print all angle
• ESC: exit
For example, by pressing the zx and nm keys, we make PiSloth do the pose shown in the figure.
4.9. Custom Step 95