Note
Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts.
Why Join?
Expert Support: Solve post-sale issues and technical challenges with help from our community and team.
Learn & Share: Exchange tips and tutorials to enhance your skills.
Exclusive Previews: Get early access to new product announcements and sneak peeks.
Special Discounts: Enjoy exclusive discounts on our newest products.
Festive Promotions and Giveaways: Take part in giveaways and holiday promotions.
👉 Ready to explore and create with us? Click [here] and join today!
Move¶
This is PiCrawler’s first project. Perform its most basic function - move.
Program
Note
You can write the program according to the following picture, please refer to the tutorial: How to Create a New Project?.
Or find the code with the same name on the Examples page of the EzBlock Studio and click Run or Edit directly.
Click the Upload & Run button at the bottom right of the screen, and PiCrawler will execute “forward” and “backward” actions in sequence.
How it works?
First, you need to understand the program framework of Ezblock. as follows:
All Ezblock projects contain these two blocks. The Start block runs at the beginning of the program and is executed only once, and is often used to set variables; the Forever block runs after Start, and will be executed repeatedly, and is often used to implement main functions. If you delete these two blocks, you can drag them back from the Basic category on the left.
Next you need to understand the following blocks.
do action allows PiCrawler to perform basic actions. You can modify the options in the first groove. For example, select “Turn Left”, “Back” and so on. The second groove can set the number of executions of the action, and only integer numbers greater than 0 can be written. The third groove can set the speed of the action, and only integers within 0~100 can be written.
do step is similar to do action, but it is not an action but a static posture. Such as “stand”, “sit”.
Both blocks can be dragged from the PiCrawler category on the left.