Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sync Rotary encoder recording with external fiber photometry
#4
Hello Ke,

If your code doesn't call R.readUSBStream() often enough to avoid buffer overruns, you'll need to initialize the USB stream with:


Code:
R.startUSBStream('UseTimer');

This will start a MATLAB timer process in the background to read incoming data from the buffer to a private field of the R object every 100ms.
You can retrieve the data as you are already doing, with:
Code:
Data = R.readUSBStream();

-Josh
Reply


Messages In This Thread
RE: Sync Rotary encoder recording with external fiber photometry - by Josh - 10-06-2021, 03:49 PM

Forum Jump: