Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Position the headset

Applies to: Instinct only. xSys electrodes are wired by hand and the device declares no motors feature, so check capabilities before calling. Not available on xBud.

Motors adjust electrode height so each contact seats against the scalp. Position the headset before measuring impedance, then re-check contact after each adjustment.

The motors feature controls the actuators. It is distinct from the motor register, which holds motor configuration. See Configure channels.

Read motor state

read accepts motor_id for one motor or motor_ids for several. Both return a results array.

const response = await client.features.executeOperation("motors", "read", {
  motor_ids: [0, 1],
});

for (const motor of response.data.results) {
  console.log(motor.motor_id, motor.enabled, motor.current_position);
}
response = await client.execute_operation("motors", "read", {"motor_ids": [0, 1]})

for motor in response.data["results"]:
    print(motor["motor_id"], motor["enabled"], motor["current_position"])

Motor 0 is enabled and sits at 12 ticks; motor 1 at 8.

Field
Type
Description

motor_id

number

Motor identifier

enabled

number

0 disabled, 1 enabled

current_position

number

Position in ticks

Move a motor

Position 17 after moving 5 from 12, and status 0 meaning no fault. A stalled motor would report 1; a stall plus gear slip would report 5.

operation is "forward" or "backward", and defaults to "forward".

displacement is a 7-bit register field, so 0 to 127 is representable. Values above 20 are accepted but exceed the typical limit of physical travel, so the SDK warns rather than rejecting: the register allows it, the actuator may not.

Warning: Position is clamped at the travel limits. A move past the end reports success while leaving the position unchanged, so read the position back rather than assuming the move landed.

Stop, brake, and calibrate

Operation
Payload
Effect

stop

{ motor_id }

Halt movement, holding position

brake

{ motor_id }

Apply the brake

calibrate

{ motor_id }

Home the motor and reset current_position to 0

Calibration homes the motor against its end stop and can exceed the default 30-second timeout. Override it for that call:

All four movement operations return motor_id, current_position, and status.

Check for faults

status is a 3-bit field, and several bits can be set at once. Test the bits rather than comparing the whole value.

Flag
Value
Meaning

MotorStatus.Stall

1

Motor stalled

MotorStatus.NotResponding

2

Motor not responding

MotorStatus.GearSlipOverrun

4

Gear slip or over-run

0 means no fault.

Warning: A stalled motor that is not stopped keeps drawing current against the obstruction. Check status after every move and stop the motor when a fault bit is set.

Verify a move

Position is reported after the move completes, but reading it back confirms the actuator reached the target rather than clamping.

Seat electrodes against impedance

Positioning and contact measurement are one loop: adjust, re-read impedance, repeat until the contact is good.

Which motor serves which channel comes from the Synap register's associated_motor_id, set when motor_associated is 1.

Next steps

Last updated

Was this helpful?