Im working with a nRF51422 EK. So, there is an android application with 2 buttons. Each of them can Set a LED. It will be set as long as the button is pressed on the application. When I release the button on the application the LED state should be low. The problem is: if I click and release to fast, it will send a high for the click but it wont send a low for release. This problem I only have when click and release to fast. Is it possible to solve this problem with a notification?
Because I will need an Information from my nRF51422 to Android Device that the information is recieved.
static void led_write_handler(ble_lbs_t * p_lbs, uint8_t led_state) {
switch (led_state){
case 0: nrf_gpio_pin_clear(LEDBUTTON_LED_PIN_NO);
nrf_gpio_pin_clear(AUF);
break;
case 1: nrf_gpio_pin_set(LEDBUTTON_LED_PIN_NO);
nrf_gpio_pin_set(AUF);
break;
case 2: nrf_gpio_pin_clear(LEDBUTTON_LED1_PIN_NO);
nrf_gpio_pin_clear(AB);
break;
case 3: nrf_gpio_pin_set(LEDBUTTON_LED1_PIN_NO);
nrf_gpio_pin_set(AB);
break;
}
Regards,
Inspectron AG