• Forum
  • Memorize data into a file directly on PC

I'm new in Bela system and I couldn't find the solution of my problem in this forum.

I have to evaluate data from an accelerometer into a file (directly to the computer and not passing through the Bela's SD card) and then analize these data through a software like MATLAB.
Is it possible with Bela connected via USB/Ethernet? If yes, latency will remain the lowest possible?

Thanks!
Max

Hi there,
we can make no latency guarantees in this case because you are going through non-realtime paths (i.e.: the network connection itself and your computer). However, you may still give this a try and see if i works for you. Assuming that MATLAB allows you to receive data in real-time over a UDP socket, then it would be very easy:
- create a C++ Bela project
- #include <UdpClient.h>
- use the UdpClient class, see documentation.

You can do this over the USB-network connection, however the gigabit ethernet port on the BeagleBone is most likely going to be more performant if you require a larger bandwidth

    4 months later

    Hi,
    Is there any examples about how to use UdpClient as Max's purpose?
    Thanks a lot!

    Cathy

    11 days later

    Hi, maxtnt. Recently, I am working on leveraging MATLAB to collect data from Bela. And I have no idea how to implement it. Can you give me some advice? If you can share the code, it would be better. Thanks!

    2 years later