MATLAB access to Nano BLE 33 sense IMU

Hello all,

Is there any way to access the IMU data of Nano BLE 33 Sense from MATLAB?

Thanks,
Sanjib

The possibilities are endless. The Arduino Nano 33 BLE is a general purpose board with a couple of interfaces and some sensors on it. You can make it do many things.

If you provide us with some more information about what you would like to do. What you have tried so far, maybe an example code, what functions of MATLAB you have tested that might help, ... we can guide you to build a solution.

There are many people here with different talents. When you ask specific question they will be happy to help. But you need to help them help you by providing some more information. There is a "How to post ..." section at the beginning of each sub forum. Please have a look.

Thanks, Klaus.

I will expand on a question a bit. I can print the IMU data to the serial port, access it from the serial monitor, save data in a file, etc. This is fine.

Can I access the same data from MATLAB? I can open the serial port from MATLAB and start dumping the data, but serial port reads from MATLAB, and serial port writes from Nano BLE 33 Sense do not seem to synchronize well. Is there any other way?

--
Sanjib

I can open the serial port from MATLAB and start dumping the data, but serial port reads from MATLAB, and serial port writes from Nano BLE 33 Sense do not seem to synchronize well. Is there any other way?

So you basically want to read a serial data stream in real time.

What baud rate are you using?

You also have the option of setting config parameters, which sets data, parity, and stop bits.

When you say "do not seem to synchronize well" what do mean. What are you seeing and why do you say this is different to say Arduino Serial Monitor or any other Serial terminal for that matter?

Because the Arduino Nano 33 BLE uses a virtual serial port the baud rate setting does not matter. But the MATLAB software might have an issue picking the data up in time. It should not because today's PC can handle much more data than your Arduino can send. But you never know. Sometimes software does not play nice together.

How do you send you data? Do you have a serial protocol to allow MATLAB to parse the data properly and throw away bad bits if necessary e.g. when you connect in the middle of your collection of bytes.

As gerrikoio said what happens when you connect the Serial Monitor. Also test a terminal like PuTTY.

If you want to know more about serial protocol have a look at NMEA 0183. This is uses by GPS receivers for instance and is very simple. I would be surprised if nobody ever used that with MATLAB. So, you should find some information on how people did that. Than you can make up your own version.