"IoT Made Easy!"
Devices: | RNBD451 |
Features: | BLE | HEART RATE |
THE SOFTWARE ARE PROVIDED "AS IS" AND GIVE A PATH FOR SELF-SUPPORT AND SELF-MAINTENANCE. This repository contains example code intended to help accelerate client product development.
For additional Microchip repos, see: https://github.com/Microchip-MPLAB-Harmony
Checkout the Technical support portal to access our knowledge base, community forums or submit support ticket requests.
- Introduction
- Bill of materials
- Hardware Setup
- Software Setup
- Harmony MCC Configuration
- Board Programming
- Run the demo
This application demonstrates how to add the BLE to an existing non wireless application and to implement a BLE heart rate sensor using HEART RATE 9 CLICK. Here we have taken an existing Heart Rate application with SAME51 and added the RNBD451 Add-on Board to make it wireless. The RN commands are sent from the SAM E51 CURIOSITY NANO BOARD to establish the heart rate BLE sensor application, which can be viewed in the MBD application.
TOOLS | QUANTITY |
---|---|
SAM E51 CURIOSITY NANO BOARD | 1 |
CURIOSITY NANO BASE FOR CLICK BOARDS | 1 |
RNBD451 Add-on Board | 1 |
HEART RATE 9 CLICK | 1 |
- Connect the HEART RATE 9 Click Board to the Mikro Bus 1 and RNBD451 Add-on Board to the Mikro Bus 2 and connect the SAM E51 CURIOSITY BOARD as shown below.
-
- Version: 6.10
- XC32 Compiler v4.30
- MPLAB® Code Configurator v5.3.7
- SAME51_DFP v3.7.242
- MCC Harmony
- csp version: v3.18.0
- dev_packs: v3.17.0
-
Any Serial Terminal application like TERA TERM terminal application
Tip | New users of MPLAB Code Configurator are recommended to go through the overview |
---|
Step 1 - Connect the SAM E51 CURIOSITY NANO BOARD to the device/system using a micro-USB cable.
Step 2 - Clone or Download the Heart Rate application with SAME51 and open it in MPLAB X IDE.
Step 3 - Open MCC project graph and the project graph for heart rate application is shown below.
Step 4 - In MCC harmony project graph, Add the RNBD component under Libraries->Harmony->wireless->drivers->BLE->RNBD and to add the satisfiers as shown below right click on the "⬦" in DEPENDENCY->UART and click "SERCOM0" to add the component.
- Configure the RNBD as Shown below.
- Configure the SERCOM0 as Shown below.
- Now the project graph will look like the one shown below.
Step 5 - In project graph, go to Plugins->Pin configurations->Pin settings and set the pin configuration as shown below.
-
For PA6 set the pin functionality as GPIO, Pin name as BT_RST, Direction as OUT as shown below.
-
For SERCOM0 use PA8 and PA9 pin as shown below.
Step 6 - Generate the code.
Step 7 - Change the following Code as mentioned below.
-
Copy the mentioned folder/file from this repository by navigating to the location linked below and paste it your project folder.
-
Copy the folder rnbd and replace it.
-
Copy the file heartrate9_example.c and replace it.
- In this file the Void function is changed to return function which returns the heart rate value
-
Copy the file main_sam_e51_cnano.c and replace it.
- In this file the RNBD_heartrate_example() function initializes the RNBD451 Module and sends the heart rate value to the BLE Heart Rate Profile.
-
Step 8 - Clean and build the project. To run the project, select "Make and program device" button.
Step 9 - The Application Serial logs can be viewed in TERA TERM COM PORT.
- The Precompiled hex file is given in the hex folder.
Follow the steps provided in the link to program the precompiled hex file using MPLABX IPE to program the pre-compiled hex image.
The application folder can be found by navigating to the following path:
- "firmware/heartrate9_click_sam_e51_cnano.X"
Follow the steps provided in the link to Build and program the application.
- After programming the board, the expected application behavior is shown in the below video.