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
Port A. |
|
Port B. |
|
Port C. |
|
Port D. |
|
Port E. |
|
Port F. |
|
the built-in light, as if it were plugged into a port. Usually use |
|
the built-in accelerometer, as if it were plugged into a port. Usually use |
|
the built-in gyroscope, as if it were plugged into a port. Usually use |
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.ledinstead.- Type:
Advanced