File Exchange

image thumbnail

Communication between Arduino and RaspberryPi using SIMULINK

version 1.0.5 (1.39 MB) by Ammar N. Abbas
Using Arduino as the sensor for Raspi to perform the fuzzy logic task on real hardware.

21 Downloads

Updated 29 Mar 2019

View Version History

View License

Simulink is used for serial communication between Arduino and Raspberry-Pi with the external mode deploying code directly on the boards.

Figure a: Arduino serial transmit and receive model with pot input and motor control as output.
Figure b: Raspberry-pi serial transmit and receive for taking input for processing using fuzzy logic and transmitting output.

Fuzzy logic is used further as a Simulink block to perform washing machine control task on real hardware.

Here is the link to the youtube video: https://youtu.be/aJTeD2Hq_-o

Cite As

Ammar N. Abbas (2021). Communication between Arduino and RaspberryPi using SIMULINK (https://www.mathworks.com/matlabcentral/fileexchange/71060-communication-between-arduino-and-raspberrypi-using-simulink), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

usman riasat

Ammar N. Abbas

@Kyzrsze Yes you can

Ammar N. Abbas

@Ajinkya: Yes you can either with a wireless connection between Simulink and Raspberry or with a wired communication channel

Ajinkya Dalvi

Can I deploy my fuzzy logic controller, build in simulink to raspeberry pi 3b+ and run it externally with my simulink plant model ?

kyzrsze Kyzrsze

can ı use this in normal mode ?

lamia zain

Awesome, It helped a lot thank you so much

Ammar N. Abbas

Connections:

Tx(5v) Arduino - Voltage divider - Rx(3.3v) Raspberry
Rx(5v) Arduino - Voltage divider - Tx(3.3v) Raspberry\

Note:
For serial communication with the Matlab/ Simulink and Arduino, DON'T use Tx0 and Rx0 of Arduino for communication with Raspberry.

Pradeep KS

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Communities

Community Treasure Hunt

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

Start Hunting!

Washing machine fuzzy with RPI and Arduino hardware implementation

Washing machine fuzzy with RPI and Arduino hardware implementation