This program simply loads the respective stimuli as threads (here I put lookAtSurroundings in visual_cortex.py and putlistenToSurroundings in audio_cortex.py). This allows both programs to run simultaneously.

Important note: Theoretically speaking the above is all you will have to do. However, there are some small issues I ran into. My Raspberry Pi had trouble taking pictures and taking audio at the exact same time (a memory issue, I believe, but I’m unsure). To fix this, I made a global file config.py that is imported into each module and contains global flags that will be set whenever audio/images are being acquired. This way, before taking audio/images it can check the flags and wait until they’ve been reset. I will explain this more in detail, but feel free to check it out exactly on my github.