Adjust Posture — Ezblock¶
In this example, we use the remote function to control the PiCrawler foot by foot and assume the desired posture.
You can tap the button to print out the current coordinate values. These coordinate values come in handy when you create unique actions for PiCrawler.
Program
After opening the example, you can see the following code block.
Switch to the Remote Control interface, and you will see the following widgets.
How it works?
What you need to pay attention to in this project are the following three blocks:
Modify the coordinate value of a certain leg individually.
Returns the coordinate value of the corresponding leg.
You may want to simplify the program with Functions, especially when you perform the same operation multiple times. Putting these operations into a newly declared function can greatly facilitate your use.