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

NRF52832 turn on specific led with specific button press on any of 3 slave boards and action on master board

I have developing one project in that i am using nRF52832 and SD 15.0. Here is the current application developing:

  1. There are 3 ble app_blinky(ble peripheral) example operated on battery and it connected to multilink central.
  2. Lets say ble peripheral name A, B, C and central device is master.
  3. Each ble peripheral- A interface simply 2 push switch and whenever it press digital signal goes to connected central and then ON particular GPIO LED.
  4. Same point two for other B and C ble peripheral. Therefore total LEDs on central side has 6 for each switch.
  5. Now i am able to connect 3 ble peripheral to central but not able to ON particular LED controlled by ble peripheral slave.

Problems:

  1. When switch press of device A , B or C then how i know in central whether it coming from A or B or C. I know connection handle link for each connection but i can do it will you please provide me program snippet for understanding.
  2. Once all switches (Total 6) press at same time then it will wake up all 3 peripherals A, B and C connect to central device. Want to ON all 6 LEDs in central at same time frame. How i can do it.

Thanks......

Parents
  • Hello,

    1. You must check the connection handles of the events, as you say. This is done in the example that you refer to, SDK15.0.0, ble_app_multilink_central, lbs_c_evt_handler() case BLE_LBS_C_EVT_BUTTON_NOTIFICATION.

    It will print:

    "Link <connection_handle>, Button state changed on peer to <1/0>"

    2: I don't understand what you are trying to explain here.

     

    Once all switches (Total 6) press at same time then it will wake up all 3 peripherals A, B and C connect to central device.

     Where are the switches located? On the central? 1 or 2 on each peripheral? If it is the peripherals, are they connected to the central at this point in time? 

     

    Want to ON all 6 LEDs in central at same time frame.

     Where are the LEDs located?  On the central? 1 or 2 on each peripheral? If it is the peripherals, are they connected to the central at this point in time? 

     

    How i can do it.

     Depends on the questions above.

    BR,

    Edvin

Reply
  • Hello,

    1. You must check the connection handles of the events, as you say. This is done in the example that you refer to, SDK15.0.0, ble_app_multilink_central, lbs_c_evt_handler() case BLE_LBS_C_EVT_BUTTON_NOTIFICATION.

    It will print:

    "Link <connection_handle>, Button state changed on peer to <1/0>"

    2: I don't understand what you are trying to explain here.

     

    Once all switches (Total 6) press at same time then it will wake up all 3 peripherals A, B and C connect to central device.

     Where are the switches located? On the central? 1 or 2 on each peripheral? If it is the peripherals, are they connected to the central at this point in time? 

     

    Want to ON all 6 LEDs in central at same time frame.

     Where are the LEDs located?  On the central? 1 or 2 on each peripheral? If it is the peripherals, are they connected to the central at this point in time? 

     

    How i can do it.

     Depends on the questions above.

    BR,

    Edvin

Children
No Data
Related