Auto-reconnect Firmata (bluetooth) I/O device

mil's Avatar

mil

13 Dec, 2019 08:37 PM

Hey Chris,

We sometimes need to de-power a Firmata I/O Bluetooth device during an experiment (e.g., to change a battery). We currently have an .mwel file that connects to the Bluetooth device at the beginning of the task. We would like the experiment to be able to reconnect to the device automatically when this happens (as well as logging when the device was connected / reconnected), instead of having to restart the experiment altogether (our current solution).

Do you have a recommended way to implement this Firmata I/O auto-reconnect behavior (e.g. in .mwel code), and if not, would it be possible to add this in to Mworks?

Thanks,
Michael

  1. Support Staff 1 Posted by Christopher Sta... on 16 Dec, 2019 08:49 PM

    Christopher Stawarz's Avatar

    Hi Michael,

    At present, if the Firmata device disconnects, the only way to reconnect is to unload and re-load the experiment (as you're currently doing).

    On-the-fly reconnecting is something we could probably support. The fact that you're de-powering the device complicates things, as MWorks would have to both reconnect to it and reconfigure it. Let me think about it.

    Cheers,
    Chris

  2. Support Staff 2 Posted by Christopher Sta... on 02 Mar, 2020 08:00 PM

    Christopher Stawarz's Avatar

    Hi Michael,

    On-the-fly reconnecting is something we could probably support.

    As noted elsewhere, this is now supported.

    Cheers,
    Chris

  3. Christopher Stawarz closed this discussion on 17 Mar, 2020 12:45 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac