Hello. is there anyone who knows how to read inputs from Raspberry as array and send output to Arduino. Serial communication between using Simulink block

조회 수: 2 (최근 30일)
I am making a medical hand system. so I need to take input in the form of array from the user using Raspberry pi and then from Raspberry pi and then send those data from raspberry pi to arduino to be proceed.
But I want to use simulink to communicate with raspberry pi
  댓글 수: 1
Prasanth Sunkara
Prasanth Sunkara 2023년 9월 22일
You can use Serial communication between Arduino and Raspberry Pi.
You can deploy two models.
1) Rapberry Pi Simulink model - get user data and use Serial Write block to send data over Serial line
2) Arduino Simulink model - use serial receive block to read the serial data
Note that if the Arduino version you are using is a 5v board, you would have to take care of 3.3v to 5v conversion between the devices.
Alternatively, you can use TCP/UDP communication if the Arduino supports WiFi. Then your whole setup becomes wire free between the two boards

댓글을 달려면 로그인하십시오.

답변 (1개)

Brahmadev
Brahmadev 2023년 9월 5일
Hi Betofe,
I understand that you would like to establish communication between an Arduino and Raspberry Pi using Simulink. You can refer to the following documentations of Raspberry Pi Support Package and MATLAB Support package for Arduino Hardware
  1. https://www.mathworks.com/hardware-support/raspberry-pi-simulink.html
  2. https://www.mathworks.com/matlabcentral/fileexchange/47522-matlab-support-package-for-arduino-hardware
Hope this helps!

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by