Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sync Rotary encoder recording with external fiber photometry
#5
(10-06-2021, 03:49 PM)Josh Wrote: 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
Thanks, Josh. It is working now.  Smile
Reply


Messages In This Thread
RE: Sync Rotary encoder recording with external fiber photometry - by ke_chen - 10-06-2021, 07:39 PM

Forum Jump: