BLE ADVERTISE AFTER BUTTON DOUBLE TAP

Hi,

   How to ble advertising the after double tap button and long press button to enable the ble ?

 i need help this content.so ,give example for this content

Regards,

Praveen M

Parents
  • Hi,

    Double press:

    1. Start a timer when a button is pressed
    2. If a button is pressed again before the timer is elapsed you set a flag that indicates a double press.
    3. Start advertising if the flag is set. 

    A long press would be something similar but with a small twist.

    Long press:

    1. Start a timer when a button is pressed
    2. When the button is released you check if the timer has elapsed, if it has elapsed then a long press was executed. You then set a flag.
    3. Start advertising if flag is set. 

    regards
    Jared

Reply
  • Hi,

    Double press:

    1. Start a timer when a button is pressed
    2. If a button is pressed again before the timer is elapsed you set a flag that indicates a double press.
    3. Start advertising if the flag is set. 

    A long press would be something similar but with a small twist.

    Long press:

    1. Start a timer when a button is pressed
    2. When the button is released you check if the timer has elapsed, if it has elapsed then a long press was executed. You then set a flag.
    3. Start advertising if flag is set. 

    regards
    Jared

Children
Related