Dear Goncalo,
I apologize in advance if this is a topic that has been previously covered but unfortunately I couldn't find a direct answer through a fairly thorough search within this group.
Here's my problem:
I'm sending an analog signal from a Teensy via USB to be read by Bonsai using the SerialStringRead tool. Currently, this is a 6-element uint8 array being sent as a string with space being the delimiter. For example, the array at any given time point may look something like this: [27 199 50 39 0 192]. Ultimately, I'm incorporating this information with timestamps and UDP inputs into a single csv file using the CombineLatest or Zip tools, which is currently not a problem if I include the serial information into my csv as a string. My question is, is there a way in Bonsai to convert each element of the string into an integer? This way, I can perform real-time processing (i.e. plotting a live trace of each channel) as opposed to being limited to post-hoc analysis.
I've experimented with the ConvertToArray tool but cannot seem to get integer outputs (see attachment). And when I do change the depth of the ConvertToArray tool, an error results (see attachment).
If you have any inputs or alternative suggestions, it would be greatly appreciated.
Thank you so much for you help.
Regards,
Richard