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 the first project. PiSloth has woken up, and it moves freely.
Before programming, you need to learn the basic usage of EzBlock Studio from here.
TIPS
This is the basic structure of the program, the Start block is used to do some initialization (even if no block is placed, it cannot be deleted) and the Forever block is, as the name suggests, a continuous loop that allows your program to change and respond.
This block is used to make PiSloth do a specific action several steps at a speed (%), for example, let PiSloth go forward 1 step at 50% speed.
Different actions can be selected from the drop down options, there are 22 in total.
This is a block that sets the duration of the previous block, unit: ms.
EXAMPLE
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.
After writing the code according to the following figure, click the download icon in the bottom right corner, you will see PiSloth move forward 3 steps, backward 4 steps, left 3 steps, right 5 steps, and finally stop. Since the whole code is placed inside the Forever block, PiSloth will repeat the above actions after stopping for a while.
You can try putting the code from the Forever block into the Start block and see what happens.