Hello,
I've been using the code below to send TTLIN to an external device from a MacBook Pro running PsychoPy (Python) connected to LabJack U3-LV, which worked ok. I am sending triggers from the 4th DIO line (FIO4) I am now using a differnet MacBook Pro that only has USB-C. I am trying to use the same code to send triggers via a USB hub (https://www.amazon.co.uk/LC-dolida-USB-Hub-Adapter-Reader-Dark-grey-5-1/...). Is this a valid solution or is the code not compatible with the USB-C and the hub? Does the hub manufacturer matter? Here is the code:
from labjack import u3
d = u3.U3();
d.getCalibrationData()
command = [u3.BitStateWrite(12, 0), u3.WaitShort(1), u3.BitStateWrite(12, 1), u3.WaitShort(1), u3.BitStateWrite(12, 0)]
d.getFeedback(command)
d.setDOState(4, 0)
d.setDOState(4, 1)
d.setDOState(4, 0)
Thanks,
Rory
The LabJack U3-LV is compatible with USB-C and USB hubs. The hub you linked to looks like it will be fine with the U3. USB hub manufacturer doesn't matter, but we recommend a high-speed USB 2 hub or higher (yours is a higher USB 3 hub).
As for your code, if PsychoPy and our driver are installed, and you are using a U3, your existing code will be compatible with your MacBook Pro through a USB hub. Are you running into problems when running your code on that MacBook? If so, please provide the error message.