cuewire.huepfburg
Rocking-platform rig extension of ArduinoSerial.
Functions
|
Parse a ``>>a,b,c,...<< `` parameter frame into |
Classes
|
Structured snapshot of the firmware's experiment parameters. |
|
ArduinoSerial subclass speaking the Hüpfburg vocabulary. |
- class cuewire.huepfburg.ExpParameters(pre_exp_duration_s: float, exp_duration_s: float, led_pattern: LedPattern, led_mode: LedMode, led_free_period_s: float, led_sin_period_s: float, led_hall_factor: str)[source]
Bases:
objectStructured snapshot of the firmware’s experiment parameters.
- led_pattern: LedPattern
- class cuewire.huepfburg.HuepfburgRig(port: str | _SerialLike, baud: int = 9600, timeout: float = 0.1, comm_test_on_open: bool = True)[source]
Bases:
ArduinoSerialArduinoSerial subclass speaking the Hüpfburg vocabulary.
- bottom_strip(on: bool, settle_s: float = 0.0) None[source]
Switch the bottom LED strip on or off (kept on during “dark” trials).
- get_exp_parameters() ExpParameters[source]
Ask the firmware for its current parameters and parse the frame.
- set_exp_duration(seconds: float, settle_s: float = 0.0) None[source]
Set the total experiment duration, in seconds.
- set_led_pattern(pattern: LedPattern, settle_s: float = 0.0) None[source]
Set the LED illumination pattern.
- set_led_period(period_s: float, settle_s: float = 0.0) None[source]
Set the free-running LED period, in seconds.
- set_led_sin_factor(factor: int, settle_s: float = 0.0) None[source]
Set the integer LED sine factor.
- set_led_sin_period(period_s: float, settle_s: float = 0.0) None[source]
Set the LED sine period, in seconds.
- set_pre_exp_duration(seconds: float, settle_s: float = 0.0) None[source]
Set the pre-experiment acclimatisation duration, in seconds.
- cuewire.huepfburg.parse_exp_parameters(line: str) ExpParameters[source]
Parse a ``>>a,b,c,…<< `` parameter frame into
ExpParameters.- Frame contents, in order:
pre_exp, exp, led_pattern, led_mode, led_free_period, led_sin_period, led_hall_factor.