Port Selection

Port Selector
Many programming blocks require that you select the ports on the EV3 Brick (A, B, C, D, 1, 2, 3, and 4) that these blocks will use. The Port Selectors are in the top right-hand corner of these blocks.
Motor Ports
This image shows the Port Selectors on all of the motor blocks. The Move Steering and Move Tank blocks are similar.





Click the Port Selector to display the port list and select a port. Motors must be connected to ports A, B, C, or D on the EV3 Brick.

Since the Move Steering and Move Tank blocks control two different motors, these have two Port Selectors. The first Port Selector is for the left motor, and the second is the right motor.
Sensor Ports
The image below show the Port Selectors on some of the blocks that use a sensor input.



Click the Port Selector to display the port list and select a port. Sensors must connect to ports 1, 2, 3, or 4 on the EV3 Intelligent Brick, except for the Motor Rotation sensor, which must connect to ports A, B, C, or D.
Port Errors
Depending on which port you select, the Port Selector may display a Port Error, as shown below.



This is a warning that the motor or sensor connected to the selected port on the EV3 Brick does not match the type required by the programming block. For example, if you select port 3 for a Touch Sensor block, but the EV3 Brick detects no sensor connected to port 3, or a different type of sensor, a Port Error will be displayed.
Tips and Tricks
1.The EV3 can only detect Port Errors when the EV3 Brick is connected to your computer (by USB, Bluetooth, or Wi-Fi).
2.You can use the Port View in the Hardware Page to easily see which motor and sensor types are connected to the different ports on your EV3 Brick when it is connected to your computer.
3.A program with a Port Error in it can still be downloaded and run on the EV3 Brick, but the performance of the affected blocks may be unpredictable.
Daisy-Chained Bricks
You can use Daisy Chaining to connect multiple EV3 Bricks together. This allows a program can control the motors and sensors of the connected EV3 Brick(s). For example, you could use Daisy Chaining to build a robot with two EV3 bricks, up to eight motors, and up to eight sensors, all controlled by a single program running on one of the EV3 Bricks.

If Daisy Chaining is enabled in your project (see Daisy Chaining), programming blocks with a Port Selector will also include a Layer Selector control, as shown below.




Layer Selector
Port Selector


Select 1 from the Layer Selector to use a motor or sensor on the same EV3 Brick that the program is running on. Select 2 to use a motor or sensor on the next EV3 brick in the chain, and so on.
Wired Port Input
If you select the Dynamic Port in the port list, a Port input will be added to the Inputs area of the programming block. This allows you to specify the port using a Numeric Data Wire connected to the Port input.


Port Selector
Dynamic Port
Port input

The Port input is Numeric, with the following values:
EV3 PortValue of Port input
A1
B2
C3
D4
11
22
33
44
Wired Input of Two Ports
If you configure a Move Steering or Move Tank block for wired port input, you will need to specify two different port numbers: one for the left motor port, and one for the right motor port. This is done by using a two-digit number for the Port input. The first digit of the number (the 10’s digit) specifies the port number for the left motor, and the second digit (the 1’s digit) specifies the port number for the right motor.

See the table above for the individual motor port number values. The table below shows some examples of Port inputs to specify two ports.
EV3 Motor Ports
(Left, Right)
Value of Port input
B, C23
C, B32
A, B12
A, D14
Wired Input of Daisy-Chained Bricks
If Daisy Chaining is enabled, selecting the Dynamic Port from either the Layer Selector or the Port Selector will add the Port input. The Port input allows you to specify both layer number and the port value(s) with a Numeric Data Wire. This is done by using a three-digit number for the Port input, as follows:
The 100’s digit specifies the layer number of the EV3 Brick (100 for the current EV3 Brick, 200 for the next brick, and so on).
The 1’s digit specifies the port number for a single motor or sensor.
For a Move Steering or Move Tank block, the 10’s digit specifies the left motor port, and the 1’s digit specifies the right motor port.
Tips and Tricks
If you do not include a 100’s digit, the port will reference the current EV3 brick, the same as if you had added 100.
See the tables above for example values for single and multiple port values without Daisy Chaining. The table below shows some example Port inputs that include Daisy Chaining.
LayerPort(s)Value of Port input
13103 (or 3)
1D104 (or 4)
1B, C123 (or 23)
24204
2A201
4B, C423
Port Selection
Quick links