Acquire data from a python device in continuous (synchronuous) mode on a PC with Matlab installed.

조회 수: 2 (최근 30일)
Hi.
I've a raspberry device on wich I've installed Python.
My raspberry reads in realtime data from an MLX 90640 IR Thermal Camera and write it on a txt file.
If I copy this txt file on a PC with Matlab installed, I can read thermal data and process it in Matlab to produce, i.e., an heatmap.
This process, however, is an asynchronous process since I must :
  1. acquire thermal data on raspberry
  2. stop the acquisition
  3. copy the data on the PC with Matlab installed
  4. run the matlab application to view the heatmap
Obviuosly I'd like to trasforf this process from asynchronous to synchronous so that I can view real time data acquired from raspberry-Python device on Matlab in the same time that they are acquired and in contunuous mode.
The question is: is there any way to do this? And if yes, how?
Any idea?
Thanks in advance

답변 (1개)

surya venu
surya venu 2024년 4월 19일 10:15
Hi,
Yes, there is a way to make this process synchronous and view real-time data acquired from the Raspberry-Python device on MATLAB in continuous mode. You can use MATLAB's built-in support for Python and TCP/IP communication to establish a real-time connection between your Raspberry Pi and MATLAB.Here's a high-level overview of the steps you can follow:
  1. Python Server on Raspberry Pi: Write a Python script on the Raspberry Pi that acts as a server. This script will read real-time data from the MLX 90640 IR Thermal Camera and send it to MATLAB using TCP/IP communication.
  2. MATLAB Client: Write a MATLAB script that acts as a client. This script will connect to the Python server on the Raspberry Pi using TCP/IP communication, receive the real-time data, and process it to create the heatmap.
Hope it helps.

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by