Hello @mdc ,
I saw you provide some answers about hardware connection. I have a further question about it. Could you give me some guidances?
I’m trying to make a task by using Psychopy to trigger the operant box to deliver sugar once the touch-screen is touched. The company where we bought the operant box offered a DLL file which provides the user with the ability to talk to the driver of the hardware by using the Portread and Portwrite functions. For C++ users the header file IO.h and library IO.lib is also provided.
Since I’m quite new here, my question maybe too silly.
Question: How does the psychopy call the Portwrite function to make a task that if the animal touch the screen then a port can be turned on to deliver a sugar?
I checked the documentation of ctypes. But I still didn’t figure out how it should work. Is it possible to provide me a simple code to try the function in psychopy? In the header file, it says:
extern “C” short WINAPI EXPORT PortRead(short rack, short port, short offset);
extern “C” void WINAPI EXPORT PortWrite(short rack, short port, short offset, short value);