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

ble blinky example

hello can someone help me solve this issue. i am not being able to controll this led . if i send any number the led will always turn on

Regards

static void led_col_write_handler(uint16_t conn_handle, ble_lbs_t * p_lbs,uint32_t led_color)
{
if (led_color=22)
{
bsp_board_led_on(LEDBUTTON_LED);
NRF_LOG_INFO("Received LED ON!");

}
else if (led_color=23)
{
bsp_board_led_off(LEDBUTTON_LED);
NRF_LOG_INFO("Received LED OFF!");

}
}

Parents Reply
  • Did you try to add the additional log print as I suggested in my previous reply? Do you see the log messages when you run the app?

    If you're developing the app in Segger Embedded Studio (SES), then launching the program in debug mode is really easy. You just build the app and then choose the menu Debug -> Go. It will load the program to target, set a breakpoint at main() function.

    If you don't have any idea how to debug a basic C application (single stepping, breakpoints etc) then sorry, I don't have bandwidth to explain it to you. I'm sure there is lots of great material online (tutorials, youtube videos etc) that you can use as reference.

    EDIT: see this video by Nordic, titled "SEGGER Embedded Studio - Basics of debugging". Seems like a good stepping stone https://www.youtube.com/watch?v=uP8RYgYGRvI

Children
No Data
Related