Triport#
Inicializando la clase Triport#
Un Triport, o expansor de 3 cables, se crea utilizando el siguiente constructor:
Triport(port)
Este constructor solo utiliza un parámetro:
Parámetro |
Descripción |
|---|---|
|
El puerto al que está conectado el expansor de 3 cables en el cerebro EXP. |
# Construct a Triport object named expander_1 in Port 1.
expander_1 = Triport(Ports.PORT1)
This expander_1 object will be used in all subsequent examples throughout this API documentation when referring to Triport class methods.
Triports also have a letter attribute denoting the specific port in use. Each port is identified by a letter (a through h) and can be accessed using the format expander_1.x, where x is the port letter. For example, expander_1.a refers to the Sensor connected to the Triport’s port A.
Métodos de clase#
index()#
The index() method returns the index of the Triport.
Devuelve: El índice del Triport.
installed()#
The installed() method checks if the Triport is connected.
Returns: True if the Triport is connected. False if it not.
timestamp()#
The timestamp() method returns the timestamp of the last received status packet from the Triport.
Devuelve: La marca de tiempo del último paquete de estado recibido en milisegundos.