- Open your Simulink model and add the "Serial Configuration" block from the Simulink library.
- Double-click on the "Serial Configuration" block to open its parameters.
- In the "Serial Configuration" parameters dialog box, set the "Baud rate" to "Custom" and enter "100000" as the custom baud rate.
- Set the "Data bits" to "8", "Stop bits" to "1", and "Parity" to "None" (unless you need to use different values).
- Set the "Flow control" to "None".
- Click "OK" to save the changes.
- Connect the "Serial Configuration" block to the "Serial Send" and "Serial Receive" blocks in your Simulink model.
- Compile and download the Simulink model to the Arduino MKR WiFi 1010.
Help with custom baud rate (100000) for Arduino MKR WiFi 1010 in Simulink
11 次查看(过去 30 天)
显示 更早的评论
Hello MATLAB Community,
I am working on a project where I need to interface an Arduino MKR WiFi 1010 with a Microzone MC7RB receiver using the m.bus protocol, which is similar to Futaba's S.Bus protocol. I am trying to create a Simulink model to read the channel data from the receiver and process it.
I have already successfully implemented a solution using Arduino IDE with a custom baud rate of 100000 bps and the Serial1 port on the Arduino MKR WiFi 1010. However, when I try to implement the same functionality in Simulink, I am facing an issue with the baud rate.
In Simulink, the available baud rates for the "Serial Receive" and "Serial Send" blocks are limited, and I cannot find an option to set a custom baud rate of 100000 bps, which is required for the m.bus protocol. The closest option available is 115200 bps, but that is not suitable for my project.
Could you please guide me on how to set a custom baud rate of 100000 bps for the Arduino MKR WiFi 1010 in Simulink? Is there any workaround or method to achieve this functionality?
Any help or suggestions would be greatly appreciated.
Thank you in advance.
Best regards
0 个评论
回答(1 个)
Atharva
2023-4-26
Hey Fellarrusto,
Yes, it is possible to set a custom baud rate of 100000 bps for the Arduino MKR WiFi 1010 in Simulink.
To set a custom baud rate in Simulink, you will need to follow the steps below:
After completing these steps, you should be able to use the custom baud rate of 100000 bps for serial communication between the Simulink model and the Arduino MKR WiFi 1010.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!