hub.portΒΆ

The port module contains constants that enable easy addressing of the lettered ports on the SPIKE Prime hub. Use the constants in all functions that take a port parameter.

To use the port module add the following import statement to your project:

from hub import port

All constants in the module should be called inside the port module as a prefix like so:

port.A

The following constants are defined:

  • A = 0

  • B = 1

  • C = 2

  • D = 3

  • E = 4

  • F = 5