bpod_core.bpod.Input

class bpod_core.bpod.Input

Input channel class representing a digital input channel.

__init__(bpod, name, io_key, index)

Input channel class representing a digital input channel.

Parameters:
  • bpod (Bpod) – The Bpod instance associated with the channel.

  • name (str) – The name of the channel.

  • io_key (bytes) – The I/O type of the channel (e.g., b’B’, b’V’, b’P’).

  • index (int) – The index of the channel.

enable(enabled)

Enable or disable the input channel.

Parameters:

enabled (bool) – True to enable the input channel, False to disable.

Returns:

True if the operation was success, False otherwise.

Return type:

bool

override(state)

Override the state of the input channel.

Parameters:

state (bool) – The state to set for the input channel.

Return type:

None

read()

Read the state of the input channel.

Returns:

True if the input channel is active, False otherwise.

Return type:

bool

property enabled: bool

Check if the input channel is enabled.

Returns:

True if the input channel is enabled, False otherwise.

Return type:

bool