Logging while disconnected

I am trying to write an app that logs from and downloads quaternion data from several (MetaMotionR) sensors. What I have gathered from reading the forums is that in order to do this, I will have to connect to each board, start logging, then disconnect before connecting to the next board, etc., then repeat the process in the opposite order at the end. I have also read that I should be serializing and deserializing the board state at some point to make this happen. However, I am not sure how to implement this and can't find any examples in the tutorials or forums. Could anyone point me to a working example of successfully logging while the board is disconnected?

My current code, which is just a basic modification of the freefall tutorial and doesn't disconnect/reconnect (but does successfully log), is here: https://pastebin.com/hEJhSuRc

Comments

  • You can connect to a few sensors at the same time.
    Everything is done with the MAC address of the sensor.

  • The problem is that I need to connect to more sensors than my phone will allow at one time - I think the exact number will be close to 8. I tried writing code similar to what was done here (except with logging instead of streaming), but the app started to malfunction once I added about 3 or more sensors. My understanding is that this is because the phone can't connect to that many at once, which is why I thought I needed to use serialization/deserialization.

  • You need to use a Linux machine for that (such as the MetaHub).

Sign In or Register to comment.