Acroname Modules

Quick Access:

Each type of BrainStem module is represented by a corresponding concrete Module implementation. The following classes are instantiated to allow communication through to the corresponding BrainStem module hardware.

The instantiation and subsequent connection to each module is as follows

>>> stem = USBStem()
# 0xXXXXXXXX is the serial number of the module.
>>> stem.connect(0xXXXXXXXX)

Connecting to the BrainStem module can take multiple forms, the simplest way to connect when you know the module’s serial number is to call connect with the serial number, as in the above code snippet. If you don’t know the serial number of the module, you can perform a discovery of the modules currently connected and print that information. For details of the connection functions API please see Connections in this reference.

USBHub3c

class brainstem.stem.USBHub3c(address=6, enable_auto_networking=True, model=24)[source]

Concrete Module implementation for the USBHub3c.

The module contains the USB entity as well as the following.

Entities:
  • system

  • app[0-3]

  • pointers[0-3]

  • store[0-2]

  • temperature[0-2]

  • timer[0-7]

  • hub

  • hub.port[0-7]

  • rail[0-6]

  • pd[0-7]

  • usb

  • uart

Useful Constants:
  • BASE_ADDRESS (6)

  • NUMBER_OF_STORES (2)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_USB_PORTS (8)

  • NUMBER_OF_RAILS (7)

  • STORE_INTERNAL_INDEX (0)

  • STORE_RAM_INDEX (1)

  • STORE_EEPROM_INDEX (2)

  • PORT_ID_CONTROL_INDEX (6)

  • PORT_ID_POWER_C_INDEX (7)

  • NUMBER_OF_PORTS (8)

class Hub(module, index)[source]
connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

i2c

usb entity adds minimal legacy support

Back to the top

USBHub3p

class brainstem.stem.USBHub3p(address=6, enable_auto_networking=True, model=19)[source]

Concrete Module implementation for the USBHub3p.

The module contains the USB entity as well as the following.

Entities:
  • system

  • app[0-3]

  • pointers[0-3]

  • usb

  • store[0-1]

  • temperature

  • timer[0-7]

Useful Constants:
  • BASE_ADDRESS (6)

  • NUMBER_OF_STORES (2)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_DOWNSTREAM_USB (8)

  • NUMBER_OF_UPSTREAM_USB (2)

  • NUMBER_OF_PORTS (12)

Bit defines for port state UInt32 use brainstem.BIT(X) from aDefs.h to get bit value. i.e if (state & brainstem.BIT(aUSBHUB3P_USB_VBUS_ENABLED))

  • aUSBHUB3P_USB_VBUS_ENABLED (0)

  • aUSBHUB3P_USB2_DATA_ENABLED (1)

  • aUSBHUB3P_USB3_DATA_ENABLED (3)

  • aUSBHUB3P_USB_SPEED_USB2 (11)

  • aUSBHUB3P_USB_SPEED_USB3 (12)

  • aUSBHUB3P_USB_ERROR_FLAG (19)

  • aUSBHUB3P_USB2_BOOST_ENABLED (20)

  • aUSBHUB3P_DEVICE_ATTACHED (23)

Bit defines for port error UInt32 use brainstem.BIT(X) from aDefs.h to get bit value. i.e if (error & brainstem.BIT(aUSBHUB3P_ERROR_VBUS_OVERCURRENT))

  • aUSBHUB3P_ERROR_VBUS_OVERCURRENT (0)

  • aUSBHUB3P_ERROR_VBUS_BACKDRIVE (1)

  • aUSBHUB3P_ERROR_HUB_POWER (2)

  • aUSBHUB3P_ERROR_OVER_TEMPERATURE (3)

class Hub(module, index)[source]
connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

USBHub2x4

class brainstem.stem.USBHub2x4(address=6, enable_auto_networking=True, model=17)[source]

Concrete Module implementation for the USBHub2x4.

The module contains the USB entity as well as the following.

Entities:
  • system

  • app[0-3]

  • pointer[0-3]

  • usb

  • mux

  • store[0-1]

  • temperature

  • timer[0-7]

Useful Constants:
  • BASE_ADDRESS (6)

  • NUMBER_OF_STORES (3)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_DOWNSTREAM_USB (4)

  • NUMBER_OF_UPSTREAM_USB (2)

  • NUMBER_OF_PORTS (6)

Bit defines for port error UInt32 use brainstem.BIT(X) from aDefs.h to get bit value. i.e if (error & brainstem.BIT(aUSBHUB2X4_USB_VBUS_ENABLED))

  • aUSBHUB2X4_USB_VBUS_ENABLED (0)

  • aUSBHUB2X4_USB2_DATA_ENABLED (1)

  • aUSBHUB2X4_USB_ERROR_FLAG (19)

  • aUSBHUB2X4_USB2_BOOST_ENABLED (20)

  • aUSBHUB2X4_DEVICE_ATTACHED (23)

  • aUSBHUB2X4_CONSTANT_CURRENT (24)

Bit defines for port error UInt32 use brainstem.BIT(X) from aDefs.h to get bit value. i.e if (error & brainstem.BIT(aUSBHUB3P_ERROR_VBUS_OVERCURRENT))

  • aUSBHUB2X4_ERROR_VBUS_OVERCURRENT (0)

  • aUSBHUB2X4_ERROR_OVER_TEMPERATURE (3)

  • aUSBHub2X4_ERROR_DISCHARGE (4)

class Hub(module, index)[source]
connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

USBCSwitch

class brainstem.stem.USBCSwitch(address=6, enable_auto_networking=True, model=21)[source]

Concrete Module implementation for the USBC-Switch.

The module contains the USB entity as well as the following.

Entities:
  • system

  • app[0-3]

  • pointer[0-3]

  • usb

  • mux

  • store[0-1]

  • timer[0-7]

  • equalizer[0-1]

Useful Constants:
  • BASE_ADDRESS (6)

  • NUMBER_OF_STORES (3)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_USB (1)

  • NUMBER_OF_MUXS (1)

  • NUMBER_OF_EQUALIZERS (2)

Bit defines for port state UInt32 use brainstem.BIT(X) from aDefs.h to get bit value. i.e if (state & brainstem.BIT(usbPortStateVBUS))

  • usbPortStateVBUS (0)

  • usbPortStateHiSpeed (1)

  • usbPortStateSBU (2)

  • usbPortStateSS1 (3)

  • usbPortStateSS2 (4)

  • usbPortStateCC1 5)

  • usbPortStateCC2 (6)

  • usbPortStateCCFlip (13)

  • usbPortStateSSFlip (14)

  • usbPortStateSBUFlip (15)

  • usbPortStateErrorFlag (19)

  • usbPortStateUSB2Boost (20)

  • usbPortStateUSB3Boost (21)

  • usbPortStateConnectionEstablished (22)

  • usbPortStateCC1Inject (26)

  • usbPortStateCC2Inject (27)

  • usbPortStateCC1Detect (28)

  • usbPortStateCC2Detect (29)

  • usbPortStateCC1LogicState (30)

  • usbPortStateCC2LogicState 31)

  • usbPortStateOff (0)

  • usbPortStateSideA (1)

  • usbPortStateSideB (2)

  • usbPortStateSideUndefined (3)

  • TRANSMITTER_2P0_40mV (0)

  • TRANSMITTER_2P0_60mV (1)

  • TRANSMITTER_2P0_80mV (2)

  • TRANSMITTER_2P0_0mV (3)

  • MUX_1db_COM_0db_900mV (0)

  • MUX_0db_COM_1db_900mV (1)

  • MUX_1db_COM_1db_900mV (2)

  • MUX_0db_COM_0db_900mV (3)

  • MUX_0db_COM_0db_1100mV (4)

  • MUX_1db_COM_0db_1100mV (5)

  • MUX_0db_COM_1db_1100mV (6)

  • MUX_2db_COM_2db_1100mV (7)

  • MUX_0db_COM_0db_1300mV (8)

  • LEVEL_1_2P0 (0)

  • LEVEL_2_2P0 (1)

  • LEVEL_1_3P0 (0)

  • LEVEL_2_3P0 (1)

  • LEVEL_3_3P0 (2)

  • LEVEL_4_3P0 (3)

  • LEVEL_5_3P0 (4)

  • LEVEL_6_3P0 (5)

  • LEVEL_7_3P0 (6)

  • LEVEL_8_3P0 (7)

  • LEVEL_9_3P0 (8)

  • LEVEL_10_3P0 (9)

  • LEVEL_11_3P0 (10)

  • LEVEL_12_3P0 (11)

  • LEVEL_13_3P0 (12)

  • LEVEL_14_3P0 (13)

  • LEVEL_15_3P0 (14)

  • LEVEL_16_3P0 (15)

  • EQUALIZER_CHANNEL_BOTH (0)

  • EQUALIZER_CHANNEL_MUX (1)

  • EQUALIZER_CHANNEL_COMMON (2)

  • NO_DAUGHTERCARD (0)

  • PASSIVE_DAUGHTERCARD (1)

  • REDRIVER_DAUGHTERCARD (2)

  • UNKNOWN_DAUGHTERCARD (3)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

MTMDAQ2

class brainstem.stem.MTMDAQ2(address=10, enable_auto_networking=True, model=22)[source]

Concrete Module implementation for MTM-DAQ-2 module

MTM-DAQ-2 modules contain contain the following entities:
  • system

  • app[0-3]

  • digital[0-1]

  • analog[0-19]

  • i2c[0]

  • pointer[0-3]

  • store[0-1]

  • timer[0-7]

Useful Constants:
  • BASE_ADDRESS (10)

  • NUMBER_OF_STORES (2)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_DIGITALS (2)

  • NUMBER_OF_ANALOGS (20)

  • NUMBER_OF_I2C (1)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • ANALOG_RANGE_P0V064N0V064 (0)

  • ANALOG_RANGE_P0V64N0V64 (1)

  • ANALOG_RANGE_P0V128N0V128 (2)

  • ANALOG_RANGE_P1V28N1V28 (3)

  • ANALOG_RANGE_P1V28N0V0 (4)

  • ANALOG_RANGE_P0V256N0V256 (5)

  • ANALOG_RANGE_P2V56N2V56 (6)

  • ANALOG_RANGE_P2V56N0V0 (7)

  • ANALOG_RANGE_P0V512N0V512 (8)

  • ANALOG_RANGE_P5V12N5V12 (9)

  • ANALOG_RANGE_P5V12N0V0 (10)

  • ANALOG_RANGE_P1V024N1V024 (11)

  • ANALOG_RANGE_P10V24N10V24 (12)

  • ANALOG_RANGE_P10V24N0V0 (13)

  • ANALOG_RANGE_P2V048N0V0 (14)

  • ANALOG_RANGE_P4V096N0V0 (15)

  • ANALOG_BULK_CAPTURE_MAX_HZ (500000)

  • ANALOG_BULK_CAPTURE_MIN_HZ (1)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

MTMEtherStem

class brainstem.stem.MTMEtherStem(address=4, enable_auto_networking=True, model=15)[source]

Concrete Module implementation for MTM EtherStem modules

USBStem modules contain the following entities:
  • system

  • analog[0-3]

  • app[0-3]

  • clock

  • digital[0-14]

  • i2c[0-1]

  • pointer[0-3]

  • servo[0-7]

  • store[0-2]

  • timer[0-7]

Useful Constants:
  • BASE_ADDRESS (4)

  • NUMBER_OF_STORES (3)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_SD_SLOTS (255)

  • NUMBER_OF_ANALOGS (4)

  • DAC_ANALOG_INDEX (3)

  • FIXED_DAC_ANALOG (False)

  • NUMBER_OF_DIGITALS (15)

  • NUMBER_OF_I2C (2)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_SERVOS (8)

  • NUMBER_OF_SERVO_OUTPUTS (4)

  • NUMBER_OF_SERVO_INPUTS (4)

  • ANALOG_BULK_CAPTURE_MAX_HZ (200000)

  • ANALOG_BULK_CAPTURE_MIN_HZ (7000)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

MTMIOSerial

class brainstem.stem.MTMIOSerial(address=8, enable_auto_networking=True, model=13)[source]

Concrete Module implementation for MTM-IO-Serial module

MTM-IO-SERIAL modules contain contain the following entities:
  • system

  • app[0-3]

  • digital[0-8]

  • i2c[0]

  • pointer[0-3]

  • servo[0-7]

  • signal[0-4]

  • store[0-1]

  • temperature

  • timer[0-7]

  • uart[0-3]

  • rail[0-2]

Useful Constants:
  • BASE_ADDRESS (8)

  • NUMBER_OF_STORES (2)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_DIGITALS (8)

  • NUMBER_OF_I2C (1)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_UART (1)

  • NUMBER_OF_RAILS (3)

  • NUMBER_OF_SERVOS (8)

  • NUMBER_OF_SERVO_OUTPUTS (4)

  • NUMBER_OF_SERVO_INPUTS (4)

  • NUMBER_OF_SIGNALS (5)

  • NUMBER_OF_USB (1)

  • NUMBER_OF_USB_PORTS (4)

  • NUMBER_OF_PORTS (5)

  • aMTMIOSERIAL_USB_VBUS_ENABLED (0)

  • aMTMIOSERIAL_USB2_DATA_ENABLED (1)

  • aMTMIOSERIAL_USB_ERROR_FLAG (19)

  • aMTMIOSERIAL_USB2_BOOST_ENABLED (20)

  • aMTMIOSERIAL_ERROR_VBUS_OVERCURRENT (0)

class Hub(module, index)[source]
connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

MTMLOAD1

class brainstem.stem.MTMLOAD1(address=14, enable_auto_networking=True, model=23)[source]

Concrete Module implementation for MTM-LOAD-1 module

MTM-LOAD-1 modules contain contain the following entities:
  • system

  • app[0-3]

  • digital[0-3]

  • i2c[0]

  • pointer[0-3]

  • store[0-1]

  • timer[0-7]

  • rail[0]

  • temperature

Useful Constants:
  • BASE_ADDRESS (14)

  • NUMBER_OF_STORES (2)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_DIGITALS (2)

  • NUMBER_OF_I2C (1)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_RAILS (2)

  • NUMBER_OF_TEMPERATURES (1)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

MTMPM1

class brainstem.stem.MTMPM1(address=6, enable_auto_networking=True, model=14)[source]

Concrete Module implementation for MTM-PM-1 module

MTM-PM-1 modules contain contain the following entities:
  • system

  • app[0-3]

  • digital[0-1]

  • i2c[0]

  • pointer[0-3]

  • store[0-1]

  • timer[0-7]

  • rail[0-1]

  • temperature

Useful Constants:
  • BASE_ADDRESS (6)

  • NUMBER_OF_STORES (2)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_DIGITALS (2)

  • NUMBER_OF_I2C (1)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_RAILS (2)

  • NUMBER_OF_TEMPERATURES (1)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

MTMRelay

class brainstem.stem.MTMRelay(address=12, enable_auto_networking=True, model=18)[source]

Concrete Module implementation for MTM-RELAY module

MTM-RELAY modules contain contain the following entities:
  • system

  • app[0-3]

  • digital[0-3]

  • i2c[0]

  • pointer[0-3]

  • store[0-1]

  • timer[0-7]

  • relay[0-3]

  • temperature

Useful Constants:
  • BASE_ADDRESS (12)

  • NUMBER_OF_STORES (2)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_DIGITALS (4)

  • NUMBER_OF_I2C (1)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_RELAYS (4)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

MTMUSBStem

class brainstem.stem.MTMUSBStem(address=4, enable_auto_networking=True, model=16)[source]

Concrete Module implementation for MTM USBStem modules

MTMUSBStem modules contain the following entities:
  • system

  • analog[0-3]

  • app[0-3]

  • clock

  • digital[0-14]

  • i2c[0-1]

  • pointer[0-3]

  • servo[0-7]

  • signal[0-4]

  • store[0-2]

  • timer[0-7]

Useful Constants:
  • BASE_ADDRESS (4)

  • NUMBER_OF_STORES (3)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_SD_SLOTS (255)

  • NUMBER_OF_ANALOGS (4)

  • DAC_ANALOG_INDEX (3)

  • FIXED_DAC_ANALOG (True)

  • NUMBER_OF_DIGITALS (15)

  • NUMBER_OF_I2C (2)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_SERVOS (8)

  • NUMBER_OF_SERVO_OUTPUTS (4)

  • NUMBER_OF_SERVO_INPUTS (4)

  • NUMBER_OF_SIGNALS (5)

  • ANALOG_BULK_CAPTURE_MAX_HZ (200000)

  • ANALOG_BULK_CAPTURE_MIN_HZ (7000)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

MTMDAQ1

class brainstem.stem.MTMDAQ1(address=10, enable_auto_networking=True, model=20)[source]

Concrete Module implementation for MTM-DAQ-1 module

MTM-DAQ-1 modules contain contain the following entities:
  • system

  • app[0-3]

  • digital[0-1]

  • analog[0-19]

  • i2c[0]

  • pointer[0-3]

  • store[0-1]

  • timer[0-7]

Useful Constants:
  • BASE_ADDRESS (10)

  • NUMBER_OF_STORES (2)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_DIGITALS (2)

  • NUMBER_OF_ANALOGS (20)

  • NUMBER_OF_I2C (1)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • ANALOG_RANGE_P0V064N0V064 (0)

  • ANALOG_RANGE_P0V64N0V64 (1)

  • ANALOG_RANGE_P0V128N0V128 (2)

  • ANALOG_RANGE_P1V28N1V28 (3)

  • ANALOG_RANGE_P1V28N0V0 (4)

  • ANALOG_RANGE_P0V256N0V256 (5)

  • ANALOG_RANGE_P2V56N2V56 (6)

  • ANALOG_RANGE_P2V56N0V0 (7)

  • ANALOG_RANGE_P0V512N0V512 (8)

  • ANALOG_RANGE_P5V12N5V12 (9)

  • ANALOG_RANGE_P5V12N0V0 (10)

  • ANALOG_RANGE_P1V024N1V024 (11)

  • ANALOG_RANGE_P10V24N10V24 (12)

  • ANALOG_RANGE_P10V24N0V0 (13)

  • ANALOG_RANGE_P2V048N0V0 (14)

  • ANALOG_RANGE_P4V096N0V0 (15)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

EtherStem

class brainstem.stem.EtherStem(address=2, enable_auto_networking=True, model=5)[source]

Concrete Module implementation for 40Pin EtherStem modules

EtherStem modules contain the following entities:
  • system

  • analog[0-3]

  • app[0-3]

  • clock

  • digital[0-14]

  • i2c[0-1]

  • pointer[0-3]

  • servo[0-7]

  • store[0-2]

  • timer[0-7]

Useful Constants:
  • BASE_ADDRESS (2)

  • NUMBER_OF_STORES (3)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_SD_SLOTS (255)

  • NUMBER_OF_ANALOGS (4)

  • DAC_ANALOG_INDEX (3)

  • FIXED_DAC_ANALOG (False)

  • NUMBER_OF_DIGITALS (15)

  • NUMBER_OF_I2C (2)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_SERVOS (8)

  • NUMBER_OF_SERVO_OUTPUTS (4)

  • NUMBER_OF_SERVO_INPUTS (4)

  • ANALOG_BULK_CAPTURE_MAX_HZ (200000)

  • ANALOG_BULK_CAPTURE_MIN_HZ (7000)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top

USBStem

class brainstem.stem.USBStem(address=2, enable_auto_networking=True, model=4)[source]

Concrete Module implementation for 40Pin USBStem modules

USBStem modules contain contain the following entities:
  • system

  • analog[0-3]

  • app[0-3]

  • clock

  • digital[0-14]

  • i2c[0-1]

  • pointer[0-3]

  • servo[0-7]

  • store[0-2]

  • timer[0-7]

Useful Constants:
  • BASE_ADDRESS (2)

  • NUMBER_OF_STORES (3)

  • NUMBER_OF_INTERNAL_SLOTS (12)

  • NUMBER_OF_RAM_SLOTS (1)

  • NUMBER_OF_SD_SLOTS (255)

  • NUMBER_OF_ANALOGS (4)

  • DAC_ANALOG_INDEX (3)

  • FIXED_DAC_ANALOG (False)

  • NUMBER_OF_DIGITALS (15)

  • NUMBER_OF_I2C (2)

  • NUMBER_OF_POINTERS (4)

  • NUMBER_OF_TIMERS (8)

  • NUMBER_OF_APPS (4)

  • NUMBER_OF_SERVOS (8)

  • NUMBER_OF_SERVO_OUTPUTS (4)

  • NUMBER_OF_SERVO_INPUTS (4)

  • ANALOG_BULK_CAPTURE_MAX_HZ (200000)

  • ANALOG_BULK_CAPTURE_MIN_HZ (7000)

connect(serial_number, **kwargs)[source]

Connect to a Module with a transport type and serial number.

Parameters:
  • transport (Spec.transport) – (Spec.transport): One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (unsigned int) – The module serial_number to look for.

Returns:

An error result from the list of defined error codes in brainstem.result

Back to the top