Clear Filters
Clear Filters

How to send a Notify with Simulink Arduino BLE send?

3 views (last 30 days)
I am trying to sense a POLAR H10 heart rate strap.
I need to send notify flag to the server,
Here is my simulink program. If anyone has some suggestion, please let me know

Answers (1)

Atharva
Atharva on 22 Jun 2023
Hey Sylvain,
To send a notify flag to the server using Simulink and Arduino with BLE (Bluetooth Low Energy), you can follow these general steps:
  1. Set up the hardware:
  • Connect your Arduino board to your computer.
  • Make sure your Arduino board has a Bluetooth module that supports BLE communication (e.g., HM-10 or HM-11).
  • Install the required libraries for Arduino BLE communication (e.g., ArduinoBLE library).
  1. Create a Simulink model:
  • Launch Simulink and create a new model.
  • Add the necessary blocks for Bluetooth communication.
  • Configure the blocks to establish a BLE connection with your heart rate strap.
  • Set up the characteristics and services to enable notifications from the heart rate strap.
  1. Implement the notify flag:
  • Add a logic block in Simulink that sets the notify flag based on your desired conditions.
  • Connect the output of the logic block to the Bluetooth block responsible for sending notifications.
  1. Configure and run the Simulink model:
  • Configure the Bluetooth blocks with the appropriate settings, such as the heart rate strap's device name or MAC address.
  • Configure the communication parameters for your specific heart rate strap (e.g., UUIDs for characteristics and services).
  • Connect your Arduino board to your computer and upload the Simulink model to it.
  • Run the Simulink model, which will start the BLE connection and send notifications based on the notify flag.
It's important to note that the specific implementation details may vary depending on your heart rate strap and the BLE module used on your Arduino board. Consult the documentation and resources provided by the heart rate strap manufacturer and the Arduino BLE library for more detailed instructions on setting up the BLE communication and implementing notifications. Remember to adapt the Simulink model and Arduino code according to your specific requirements and the BLE capabilities of your heart rate strap.
  1 Comment
Sylvain
Sylvain on 11 Jul 2023
I had another try, but I am not succeful, I will see if i can do a direct Arduino code on my ardware, see if this works on its own

Sign in to comment.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!