pybpodapi

class pybpod_rotaryencoder_module.module.RotaryEncoder(connected=False, module_name='', firmware_version=0, events_names=[], n_serial_events=0, serial_port=None)[source]

Bases: pybpodapi.bpod_modules.bpod_module.BpodModule

Note

This API was based on the Rotary Encoder board documentation.

create_resetpositions_trigger()[source]

Create a trigger to reset the positions and the threshods :return: trigger_id

activate_outputstream()[source]

Activate module output stream.

deactivate_outputstream()[source]

Deactivate module output stream.

stop_streaming_and_logging()[source]

Stops streaming + logging.

enable_positions_threshold()[source]

Enable all position thresholds.

set_position_zero()[source]

Set current rotary encoder position to zero.

starts_logging()[source]

Start logging position+time data to the microSD card.

stops_logging()[source]

Finish logging position+time data to the microSD card.

timestamp_byte(value)[source]

value as to be a byte

Usage example

#...

bpod = Bpod()

# get the module connected to the first bpod serial port.
rotary_encoder = bpod.modules[0]

# call a function of the module
rotary_encoder.activate_outputstream()

bpod.stop()