Transferring data from Arduino to matlab

I want to set up an Arduino (ESP32) to respond to a request for data from another device. In this case a pc using matlab. I have the matlab part working. Where can I find some examples that are not webserver or HTTP format. Just a simple matlab (or any other computer) askes for data and the arduino responds.

Thanks.

How is your Arduino connected to the PC?

If it's Serial/UART, then it's just the same as serial comms with any other device.

You will need to find out the format of the requests that Matlab sends, and the format it expects for replies.

Your sketch will need to receive the serial data, recognise the Matlab requests, and send its replies in the required format.

https://learn.sparkfun.com/tutorials/serial-communication/all

Forgot one important piece of data. Want to do it over WiFi. (My bad, I do know better).

Additional information, as I wake up. I have a web server up and running. For this application I don't need/want a web server. I am collecting information on the ESP32 (sensor data) that I want to transfer to MATLab. The data on the ESP32 will be stored in an array The plan is/was that MATLab would ask for data every so many minutes. When MATLab requests the ESP would send the latest data than clear the data on the ESP and start gathering again.

Sorry for the fragmented question but that is how I think.

1 Like

Thanks for the pointers to the matlab side.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.