How to connect Raspberry pi zero to Matlab via wifi

12 ビュー (過去 30 日間)
Roston Mascarenhas
Roston Mascarenhas 2022 年 3 月 9 日
回答済み: Chandu 2022 年 4 月 25 日
I have followed the required steps in order to connect Raspberry pi zero to Matlab but the WLAN IP address shows Not Connected. So anybody here can help me to do so??

回答 (1 件)

Chandu
Chandu 2022 年 4 月 25 日
Hi,
To communicate with the Raspberry Pi over Wi-Fi, please follow these steps:
The Raspberry Pi must be connected to a wireless network that the computer running MATLAB can also access. The simplest way of achieving this is to have both the device and the computer connected to the same wireless network.
For the IP address of the Raspberry Pi, see: IP Address of Raspberry Pie
Verify that your network is correctly configured by pinging the IP address of the Raspberry Pi. In a Command Prompt run the command:
ping RPI_IP
where RPI_IP is the IP address of the Raspberry Pi. If it is successful this should return a reply and time information, if not it reports that the request timed out.
Once you can successfully ping the Raspberry Pi, configure MATLAB or Simulink to use the correct IP address to communicate with the hardware.
MATLAB TCP/IP client supports to connect with the remote hosts or hardware from MATLAB for reading or writing the data. Create a TCP/IP connection, configure the connection (if necessary) and then read or write data. After that close the connection as well.
t = tcpclient(address,port);
You can also refer to MATLAB IP Configure MathWorks Documentation for Future Reference.

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Raspberry Pi Hardware についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by