Hi Josh,
Many thanks for your swift reply!
I have some further questions after presenting your answer to my PI 🙂
We consider implementing the Bpod this way:
We use our own matlab-based code for stimulation, divided to 5 minute blocks. The PC sends the sounds to the processor while the trial is playing, so there is no delay between trials. This arrangement might prevent us from using the code you provided above, as there is a break after each trial.
During the block, after each trial we want to send a trigger from TDT via the BNC digital input to the state machine, to drip water.
The mouse licks will cause the state machine to send another pulse via the BNC ditigal output to TDT.
We have our own general timer to coordinate the inputs from the Bpod and our own systems.
and now to my questions:
1) in general, it seems like we don't need to collect the data from the state machine after every trial, as we are using the output channel. am I right? or am I missing something?
2) if we do need to - can one collect the current data <during> the current trial, in real time?
3) last - in case we only check the buffer every block: how large is the memory allocated for each event in the state machine, and how big is the serial buffer the state machine has? assuming a block of 300 seconds, we evaluate a maximal number of 3000 licking/dripping events.
many thanks again 🙂