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

1 view (last 30 days)
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)

Hornett
Hornett on 2 Sep 2024
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.

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!