hub.ports

The hub’s ports — the sockets where you plug in LEGO motors and sensors.

Use hub.ports.A to hub.ports.F. Each one is a lpf2.local.port, so you can ask it what’s plugged in, drive a motor or read a sensor.

Attributes

A

Port A.

B

Port B.

C

Port C.

D

Port D.

E

Port E.

F

Port F.

LED

the built-in light, as if it were plugged into a port. Usually use hub.led instead.

accelerometer

the built-in accelerometer, as if it were plugged into a port. Usually use hub.accelerometer instead.

gyro

the built-in gyroscope, as if it were plugged into a port. Usually use hub.gyro instead.

Module Contents

hub.ports.A: lpf2.local.port[source]

Port A.

hub.ports.B: lpf2.local.port[source]

Port B.

hub.ports.C: lpf2.local.port[source]

Port C.

hub.ports.D: lpf2.local.port[source]

Port D.

hub.ports.E: lpf2.local.port[source]

Port E.

hub.ports.F: lpf2.local.port[source]

Port F.

hub.ports.LED: lpf2.port[source]

the built-in light, as if it were plugged into a port. Usually use hub.led instead.

Type:

Advanced

hub.ports.accelerometer: lpf2.port[source]

the built-in accelerometer, as if it were plugged into a port. Usually use hub.accelerometer instead.

Type:

Advanced

hub.ports.gyro: lpf2.port[source]

the built-in gyroscope, as if it were plugged into a port. Usually use hub.gyro instead.

Type:

Advanced