В момента ресурсът е наличен само на английски

Input parameters Pro Preview

We have already experimented with the program that makes the robot move forward. But what exactly makes it move and by how much?

Необходимо е да се абонирате за FLLCasts.com, за да достъпите това видео

Абонирай се

  • #1658
  • 20 Aug 2020

A command in programming is the name of a function, followed by two brackets. Examples of commands are MotorPair(), start_at_power() and wait_for_seconds().

The input parameters of a command are the information that it needs in order to execute what we need it to:

  • In the "wait_for_seconds()" command we enter an input parameter in the form of a number that indicates how much we want the robot to wait. The number itself represents how many seconds the command will wait before continuing with the next line of code;
  • The "start_at_power()" command also has a numeric input parameter. The number represents how fast the motors will turn, where 100 is moving forward as fast as possible, -100 is moving backwards as fast as possible and 0 is not moving at all;
  • The "MotorPair()" command has more complex input parameters. It requires two parameters that must be letters from "A" to "E". This is how we tell the robot which two motors drive it forward and that they should move together at the same time.