Skip to content

Latest commit

 

History

History
45 lines (23 loc) · 1.59 KB

ezblock_move.rst

File metadata and controls

45 lines (23 loc) · 1.59 KB

Move

This first project teaches how to program movement actions for the PiCar-X. In this project, the program will tell the PiCar-X to execute five actions in order: “forward”, “backward”, “turn left”, “turn right”, and “stop”.

To learn the basic usage of Ezblock Studio, please read through the following two sections:

  • ezblock:create_project_latest

image

TIPS

image

This block will make the PiCar-X move forward at a speed based on a percentage of available power. In the example below “50” is 50% of power, or half-speed.

image

This block will make the PiCar-X move backward at a speed based on a percentage of available power.

image

This block adjusts the orientation of the front wheels. The range is “-45” to ”45”. In the example below, “-30” means the wheels will turn 30° to the left.

image

This block will cause a timed break between commands, based on milliseconds. In the example below, the PiCar-X will wait for 1 second (1000 milliseconds) before executing the next command.

image

This block will bring the PiCar-X to a complete stop.

EXAMPLE

Note

  • You can write the program according to the following picture, please refer to the tutorial: ezblock:create_project_latest.
  • Or find the code with the same name on the Examples page of the EzBlock Studio and click Run or Edit directly.

image