neurogears / vestibular-vr

Closed-loop VR setup for Rancz Lab
2 stars 0 forks source link

H1 --> H2 Motor control signal #53

Open RoboDoig opened 1 month ago

RoboDoig commented 1 month ago

Now that the motor control is implemented in Bonsai, we should add the option to implement the motion control algorithm via direct communication from H1 --> H2.

This basic algorithm is as follows: 1) Register to select signal source (flow sensor 1/2 X/Y) 2) Register to set gain on signal source 3) Sent via tx/rx to H2 4) H2 convert to immediate pulses and drive motor 5) Register/option to disable direct control

RoboDoig commented 1 month ago

@filcarv here are some example flow sensor values from the rig as requested.

flow_sensor.csv

RoboDoig commented 1 month ago

Expanding on the algorithm in more detail here:

Required registers (can be renamed):

Algorithm (if ENABLE_DIRECT_CONTROL): On H1: