Поредица от инструкции изграждат всяка програма Pro Preview

Нека направим програма, при която има движение напред и назад.

  • #378
  • 04 Feb 2017
  • 2:45

Програмата като поредица от инструкции

Дръпнете и поставете второ блокче върху полето за програмиране на софтуера. Може да добавяте нови блокчета преди или след вече съществуващи блокчета.
Компютърната програма представлява поредица от инструкции или команди, които се изпълняват една след друга.

Как да изтриете грешно блокче

Ако трябва да махнете блокче, може да го дръпнете отново към палитрата и да го оставите там. Бутонът "del" (delete, изтриване) на клавиатурата върши същата работа, ако този начин на работа ви е по-удобен.

English

Our robot moves forward and we can also program the robot to move backward. Let me just find my program.

Like this. Now, in this video we must improve on the program so that it moves forward, backward, forward, backward, etc. We'll set this as a challenge. We'll show you part of the solution and then we'll leave you to experiment with the different tasks. So, let's first implement a program so that it moves forward and backward.

This here is a program for moving backward. You see -1 as rotations and we can drag and drop one more block into the program. We can drop the block as a last block or as a first block. Let's just drop it as a first block. Now, this program will make the robot move forward for one rotation backward for -1 rotation. And that's important because this is what programming looks like. You just add a number of blocks in a series and you reach a behavior of the robot. In this case forward, backward. Let's download it and run it.

Again, I'll have to find it.

Forward, backward. What you need to do from here is to just add more blocks to the program and configure their settings. And you reach a final program that makes the robot moves like a Yo-yo. And you'll need.. You have to find out how many blocks you'll need. Now, it's possible that you make a mistake. Like clicking on another block and even placing it. You can delete this block. You just drag and drop this block back to the pallet. Like this.

Or you can just use the Delete key. You just select the block and press delete. So, the task from here is to implement the Yo-yo. To do it on your own by adding more blocks to the program.

Курсове и занятия включващи този Урок

Този Урок е използван в следните курсове и занятия.

Image for EV3 Phi. Introduction to robotics with LEGO Mindstorms
  • 92
  • 220:20
  • 36
Image for Series of instructions make a program
  • 11
  • 0
  • 4
  • 3d_rotation 0
Image for Instructors Remote Training
  • 136
  • 280:11
  • 156
Image for How to make the robot move
  • 24
  • 0
  • 11
  • 3d_rotation 0
Image for Роботика с LEGO - Ниво 1.0 - Приключение в Космоса
  • 126
  • 123:52
  • 150
Image for Занятие 1 - Движение като Йо-Йо
  • 19
  • 4
  • 9
  • 3d_rotation 1
Image for Ниво A - Въведение - Роботика с LEGO
  • 142
  • 133:42
  • 187
Image for Занятие 2 - Йо-йо
  • 18
  • 3
  • 8
  • 3d_rotation 1