Does the packet output block from Simulink Desktop Real-Time allow bluetooth communication?

Does anyone know if it is possible to establish bluetooth comunication using simulink? Does the packet output block from Simulink Desktop Real-Time allow this? I am running a project using external mode and for now I communicate using serial USB with a STM board but I would like to replace the serial USB by a bluetooth (HC-05 module).
Thank you very much for your time.
Best regards,
Cristiana Pinheiro.

Answers (1)

Yes, you can establish Bluetooth communication in Simulink using an HC-05 module. Here's how:
1. Connect HC-05: Wire the RX/TX pins of the HC-05 to the TX/RX pins on your STM board.
2. Configure Simulink:
- Use *Serial Send* and *Serial Receive* blocks.
- Set the baud rate to match the HC-05 (usually 9600).
3. External Mode:
- Ensure COM port settings in Simulink match the Bluetooth serial port.
This setup allows replacing USB serial communication with Bluetooth.

Categories

Products

Release

R2023a

Asked:

on 26 Sep 2022

Answered:

on 2 Sep 2024

Community Treasure Hunt

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

Start Hunting!