This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52832 eval board key press functions

I recently purchased a Rigado BMD-350 eval board (nrf52832) and am trying to use it for creating a simple ble remote project. I am kind of lost.

As I look through the heart rate monitor sample code, I saw that under board support package has both bsp.c and bsp_btn_ble.c. The codes in bsp_btn_ble.c has calls function (like bsp_button_is_pressed()) reside in bsp.c, and configure some of the buttons for trigger ble functionality. However, for my application, I would like to configure all the button just as regular button, and when I press a button, it will send the notification to the client device for the key press value. Should I write another .c file (like remote.c) for detecting each of the key press by calling the functions in the bsp.c just like how it is done in the bsp_btn_ble.c?

This brings up another question, I have done some basic code in TI chip set where I send a command from the client device to enable notification in the server device, so that the server device will start sending key press value to the connected client device whenever the attribute values that represent the keypress is changed (when key is pressed). If I would like to create something similar with this eval board, what will be the best sample code I should be looking at? I saw the ble_dis.c where it has an attribute table created for discovery. Would I could create another .c file like ble_remote.c in nRF_BLE directory and create another attribute table, with one of the attribute as notification bit so that client device can write a bit to this attribute to enable notification on the server device?

Thanks,

Parents Reply Children
Related