Hi, i'm starting to develop on the nrf52840DK and trying to understand the Nordic SDK (using the lastest version at the time 15.3). Just edited the blinky example to read a button, if it's pressed a led goes on, my intention was to create the simplest program to achieve this but the led is always on and the button does nothing, my question is why?
#include <stdbool.h>
#include <stdint.h>
#include "nrf_delay.h"
#include "boards.h"
/**
* @brief Function for application main entry.
*/
int main(void)
{
/* Configure board. */
bsp_board_init(BSP_INIT_LEDS || BSP_INIT_BUTTONS);
bsp_board_led_off(3);
while (true)
{
if (bsp_board_button_state_get(1)) {
bsp_board_led_on(3);
}
}
}