Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotary Encoder Module: simultaneous USB output stream and data logging?
G'day Josh,

I've been using Bonsai to read the Rotary Encoder Module's USB output stream and there are two things I want to do.

  1. Log position data on the module's SD card and retrieve it after Bonsai has released the COM
  2. Probe whether there's a difference in the module's position and what Bonsai receives, since Bonsai's record of position information shows only integer degrees
If I start logging to SD, pass COM to Bonsai, and then .getLoggedData() after Bonsai's released the COM there is some data on the SD card, but it's pretty much empty. It seems to me that while Bonsai is using the COM there's no position data being written to the SD card. Is this because writing to the SD card is technically another USB/COM writing thing and both can't be done at once?
Hi George,

I wasn't aware that Bonsai had a source for our rotary encoder module!
I'm not sure why position is only exposed as integer degrees - it is transmitted to the PC as 'tics' with 1024 tics per revolution of the encoder. The Bonsai source should be easily modified to expose tics, or fractional degrees.

Depending on what Bonsai is doing when you "pass COM to Bonsai", SD logging may be terminated. Is there a public link to the code you're using?


Forum Jump: