![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1483541/image.png)
Signal Processing in Simulink
3 views (last 30 days)
Show older comments
Hello. I have 3 HC-SR04 Ultrasonic Sensors connected to Arduino Uno. I transferred data from one Sensor using Serial communication to Simulink and IDE to transfer code to Arduino Uno. The Code converts the data in Binary, so that the block can read it and i found it the only method that works.
Now i want to read data from 3 sensors in Simulink through Arduino Uno simulatenously. As i cannot use any Code and need to do it with Simulink Block, could you please help me?
My projects only runs Simulink Blocks, otherwise i think it would be easier to seperate Strings and just read with Matlab code.
Thankyou.
0 Comments
Answers (1)
Raj
on 15 Sep 2023
Hi Aashish,
As per my understanding I presume you are unable to connect and read data from 3 sensors simultaneously in Simulink. For this you can put 3 Digital Input block as shown.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1483541/image.png)
You can later add a MUX block from Library Browser if you intend to combine these digital output data.
You can also add a MATLAB Function block. By using a Function block, you can perform operations such as filtering, scaling, thresholding, or any other signal processing tasks on the digital input signal before it is sent to the output block.
Refer to the documentation below from MathWorks about Simulink Support Package for Arduino Hardware
I hope this resolves the query you had!
0 Comments
See Also
Categories
Find more on Modeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!