<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Detecting a button double click?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102927/detecting-a-button-double-click</link><description>We are new to Nordic and have been making great progress with our nrf52840DK board and successfully running many of the Nordic SDK examples. We can&amp;#39;t seem to find a single example of an API that will notify on a variety of button events (more than just</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 18 May 2024 05:43:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102927/detecting-a-button-double-click" /><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/484857?ContentTypeID=1</link><pubDate>Sat, 18 May 2024 05:43:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bbad2d1-d60c-4e6c-b16b-5dbe747fdb93</guid><dc:creator>nik2k</dc:creator><description>&lt;p&gt;Hi Steve, a junior (and fairly inexperienced) embedded dev here, who also just recently started programming Nordic devices.&lt;/p&gt;
&lt;p&gt;I would be so grateful if you could share the code that you wrote for the button implementation (button.c and button.h). See I tried my own hand at this because my project required detecting and distinguishing between only LONG and DOUBLE presses. Here is what I could come up with, based on the very helpful example code:&amp;nbsp;&lt;a id="" href="https://github.com/droidecahedron/nrf_io_practice.git"&gt;https://github.com/droidecahedron/nrf_io_practice.git&lt;/a&gt;, shared by Johnny N above:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;typedef enum {
    SLEEPING,
    LISTENING,
    CLOSED
} gpio_activation_state_t;

/* Timeout windows for detecting long and double press. */
static const k_timeout_t long_press_window = K_MSEC(5000);
static const k_timeout_t double_press_window = K_MSEC(1000);

/* Flags for detecting long and double press. */
volatile bool double_press_detected;
volatile bool long_press_detected;
volatile gpio_activation_state_t input_state;

/* Callback when long press timer expires. */
static void long_press_timer_exp_fn(struct k_timer *timer_id)
{
    if (input_state == LISTENING)
    {
        if (1 == gpio_pin_get_dt(&amp;amp;button)) {
            long_press_detected = true;
        }
        else {
            /* Single press! (though not a very good way to detect it as you must wait 5 seconds!)*/
        }
        input_state = CLOSED;
    }
}

/* Define timers for double and long press detection. */
K_TIMER_DEFINE(double_press_timer, NULL, NULL);
K_TIMER_DEFINE(long_press_timer, long_press_timer_exp_fn, NULL);

/* Callback when button is pressed. NOTE: No debouncing logic! */
void button_pressed(const struct device *dev, struct gpio_callback *cb, uint32_t pins)
{
    switch (input_state)
    {
        case SLEEPING: /* Logic for the first time the key is pressed. */
            input_state = LISTENING;
            /* Clear flags for double/long press detection. */
            double_press_detected = false;
            long_press_detected = false;
            /* Start one shot timers for double and long press windows. */
            k_timer_start(&amp;amp;double_press_timer, double_press_window, K_NO_WAIT);
            k_timer_start(&amp;amp;long_press_timer, long_press_window, K_NO_WAIT);
            break;
        
        case LISTENING: /* Button has been pressed a second time. */
            if (k_timer_status_get(&amp;amp;double_press_timer) &amp;gt; 0) /* Double press timer expired. */
            {
                LOG_WRN(&amp;quot;Double press window expired.&amp;quot;);
            }
            else if (k_timer_remaining_get(&amp;amp;double_press_timer) &amp;gt; 0) /* Double press timer still running.*/
            {
                double_press_detected = true;
                k_timer_stop(&amp;amp;long_press_timer);
            }
            input_state = CLOSED;
            break;

        case CLOSED: default:
            /* Lock up GPIO when a transaction is underway. */
            break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I made use of a very basic state machine and &lt;strong&gt;two Zephyr timers&lt;/strong&gt; to detect double presses (within at most 1000 ms) and a long press (after at least 5000ms). It works pretty well even though there is &lt;strong&gt;no debouncing logic&lt;/strong&gt;, for now. I am &lt;strong&gt;very curious&lt;/strong&gt; to see your implementation if you would be willing to share it.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Shovnik.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/443976?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 00:21:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bd68142-7bab-4043-b726-202d92ec9a8f</guid><dc:creator>SteveKranz</dc:creator><description>&lt;p&gt;Hi Johnny N.&lt;/p&gt;
&lt;p&gt;As it turned out your implementation was good to study and gave me some ideas and I learned something about timers along the way. Today I went in a bit of a different direction and implemented a full button.c and button.h that de-bounces the button as well as detects single click, double click and long press events. I think I have what I need for the moment. Your files gave me the nudge that I needed. Thanks again.&lt;/p&gt;
&lt;p&gt;Steve K., PuzL Labs, LLC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/443949?ContentTypeID=1</link><pubDate>Thu, 31 Aug 2023 14:45:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7b21164-3614-4ce7-bb06-62402395644c</guid><dc:creator>Johnny Nguyen</dc:creator><description>&lt;p&gt;Sounds great, Steve.&lt;/p&gt;
&lt;p&gt;As you&amp;#39;ll see in the comments in that repo, there is some cleanup to do on my end in there, but it is functional. (You can see some of the cleanup type of changes I reference in the init comment &lt;a href="https://github.com/droidecahedron/nrf_io_practice/pull/2"&gt;here in this PR&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The Zephyr Timer documentation page I linked has some other examples on timer usage, my timer implementation is certainly less than optimal for button detection and is quite barebones, but you can extrapolate for more complex and robust logic, the application logic is up to you. (Such as accounting for bouncy buttons, etc.)&lt;/p&gt;
&lt;p&gt;Glad it could be helpful to you! I like to keep the io.c as a separate file so you can drag/drop it into your other applications. (I also like to put my BLE services into their own source files as well.)&lt;/p&gt;
&lt;p&gt;Do not hesitate to reach out if there is anything further.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/443807?ContentTypeID=1</link><pubDate>Thu, 31 Aug 2023 00:35:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3007a7a6-7da9-4571-bb23-a7d8cbafa586</guid><dc:creator>SteveKranz</dc:creator><description>&lt;p&gt;Hi Johnny N,&lt;/p&gt;
&lt;p&gt;Yes, thank you very much. I think that is a great starting point for me. I downloaded your sample application using:&lt;/p&gt;
&lt;p&gt;$ git clone &lt;a id="" href="https://github.com/droidecahedron/nrf_io_practice.git"&gt;https://github.com/droidecahedron/nrf_io_practice.git&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And then I used the Visual Studio &amp;quot;Create an existing application&amp;quot; and pointed it at that sample application and after Adding a Build Config it built/flashed and is running on my nrf52840-DK. I will fiddle with this working sample and alter as needed for the particular system we are developing. Thanks again.&lt;/p&gt;
&lt;p&gt;Steve K, PuzL Labs, LLC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/443795?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 20:52:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1cacd85-f339-426c-b10c-9a4a70df6885</guid><dc:creator>Johnny Nguyen</dc:creator><description>&lt;p&gt;Hi Steve.&lt;br /&gt;&lt;br /&gt;To address the CAF front, here&amp;#39;s a sample I modified from the CAF sample to use single and double clicks:&amp;nbsp;&lt;a href="https://github.com/droidecahedron/nrf_caf_click"&gt;droidecahedron/caf_click&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, you can alternatively continue using your i/o callback and add some logic with&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/kernel/services/timing/timers.html"&gt;Timers &amp;mdash; Zephyr Project Documentation&lt;/a&gt;&amp;nbsp;to determine single vs double vs long. These can be pretty cheap.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have a generic i/o practice repo that utilizes the logic pretty similarly here to the CAF example:&amp;nbsp;&lt;a id="" href="https://github.com/droidecahedron/nrf_io_practice"&gt;droidecahedron/nrf_io_practice&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(You can take whatever is used in io.c and roll it into your main.c however you like. I just abstracted it away to another file in that project to keep main empty.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Both need some clean up but either of them should get you most of the way there. I am partial to using timers over CAF for this use case. Pick whichever you prefer. One benefit of using timers is you can specify a bit more what the &amp;quot;double click&amp;quot; duration is in a straightforward way. Another is knowing pretty directly which peripherals are actually being used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/443724?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 12:11:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8148738f-8131-437b-8116-6c6d4a6d9865</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There does not seem an in-detail sample, but there is the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/caf/click_detector.html#click-types"&gt;CAF: Click detector module&lt;/a&gt; which can help. You can refer to the implementation details there, that does various click types, say, double click for instance. You can take a look at the click_detector code and copy the same method used here into your own application.&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/443461?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 20:30:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e9b8c11-5c3a-4777-b044-b64a2260c29c</guid><dc:creator>SteveKranz</dc:creator><description>&lt;p&gt;Hi Priyanka,&lt;/p&gt;
&lt;p&gt;Uggggg, I took a look at the recent link. Again, I&amp;#39;m coming up empty handed. Frankly, it doesn&amp;#39;t seem that the question I&amp;#39;m asking should be this difficult to get to the bottom of. I wish that I could be directed to a very specific block of logic that demonstrates how a double-click of a button can be detected. (buttons like any of the four buttons on the nrf52840-DK board). I&amp;#39;ve given an honest look at the collection of CAF content in my SDK as well as the documentation and I find it lacking. It is by no means obvious how to answer my question from the general pointers I&amp;#39;ve been given in the direction of CAF. I am imagining that there really wouldn&amp;#39;t be that much code involved, but if I don&amp;#39;t know the various interfaces available and the syntax it&amp;#39;s hard to get anything working. I typically am very good at hunting things down and reverse engineering. It was not so difficult for me to locate/generate the logic required for a single button click (non-CAF), I&amp;#39;ll show it below. It would be fantastic if someone could just present an example with this level of detail that I could then leverage to get Button Double-Click Detection.&lt;/p&gt;
&lt;p&gt;Button Single-Click Detection.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new, courier;"&gt;#include &amp;lt;zephyr/kernel.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;#define Button_NODE DT_ALIAS(sw0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET(Button_NODE, gpios);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;static struct gpio_callback button_cb;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;static void &lt;strong&gt;button_callback&lt;/strong&gt;(const struct device *gpiob, struct gpio_callback *cb, gpio_port_pins_t pins)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="background-color:#ffff00;"&gt;// TBSL &amp;mdash; do logic here to process single button press event.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;static void &lt;strong&gt;Init_button&lt;/strong&gt;()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (gpio_is_ready_dt(&amp;amp;button)) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpio_pin_configure_dt(&amp;amp;button, GPIO_INPUT);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpio_pin_interrupt_configure_dt(&amp;amp;button, GPIO_INT_EDGE_TO_ACTIVE);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpio_init_callback(&amp;amp;button_cb, button_callback, BIT(button.pin));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpio_add_callback(button.port, &amp;amp;button_cb);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;int &lt;strong&gt;main&lt;/strong&gt;(void)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp; Init_button();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp; while (true) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; k_msleep(5000);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp;&amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/443271?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 05:47:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a9f2615-c80f-4cd1-90b4-f817447d573d</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Please take a look at the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf_desktop/README.html"&gt;nRF Desktop application&lt;/a&gt; where the CAF:Buttons module has been used.&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/443226?ContentTypeID=1</link><pubDate>Sat, 26 Aug 2023 00:31:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ec4da78-30ce-4c1e-9869-4a01fa0864ea</guid><dc:creator>SteveKranz</dc:creator><description>&lt;p&gt;Hi Priyanka,&lt;/p&gt;
&lt;p&gt;Thanks, good to know that v2.4.1 supports sensing button click events. I went looking within my v2.4.1 Nordic SDK installation to find a code example that might show the use of the &amp;quot;CAF: Buttons module&amp;quot;. I couldn&amp;rsquo;t find anything. Being new to Nordic I guess it&amp;#39;s possible I am looking in the wrong place. If you happen to have a tip I&amp;#39;d be grateful. Thanks in advance.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Steve K, PuzL Labs, LLC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/442281?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 11:51:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38e94c57-e75d-4deb-a9fb-473ec107c33d</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The same can be found for v2.4.1 as well:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/libraries/caf/caf_overview.html#:~:text=pressed%20or%20released.-,CAF%20click%20events,%EF%83%81,-Header%20file%3A"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/libraries/caf/caf_overview.html#:~:text=pressed%20or%20released.-,CAF%20click%20events,%EF%83%81,-Header%20file%3A&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our applications like the nRF Desktop application, asset tracker etc use the CAF buttons library.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/441942?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 17:43:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a671ff80-ba55-4ce2-86a5-6d274a2a0042</guid><dc:creator>SteveKranz</dc:creator><description>&lt;p&gt;Hi Priyanka,&lt;br /&gt;&lt;br /&gt;Thank you, I took a look at your response and went looking within my Nordic SDK installation to find examples that might show the use of the &amp;quot;CAF: Buttons module&amp;quot;. I couldn&amp;rsquo;t find anything. Also, the link you provided for &amp;ldquo;click events&amp;rdquo; resolved to documentation for SDK v2.4.99 and I&amp;rsquo;m wondering if my older (but still fairly recent) SDK v2.4.1 installation doesn&amp;rsquo;t have the &amp;quot;CAF: Buttons module&amp;quot;. Maybe it&amp;#39;s something very new. Anyhow, I&amp;rsquo;m still a bit confused and could probably still use a little guidance. Thanks in advance.&lt;br /&gt;&lt;br /&gt;Steve K.&lt;br /&gt;PuzL Labs, LLC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/441856?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 12:03:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b845e21-3039-47be-bd25-ef87c715186f</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Steve,&lt;/p&gt;
&lt;p&gt;My bad. Looks like this is now possible using the CAF library. Please take a look at the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/caf/caf_overview.html#caf-button-events:~:text=pressed%20or%20released.-,CAF%20click%20events,-%EF%83%81"&gt;click events&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detecting a button double click?</title><link>https://devzone.nordicsemi.com/thread/441847?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 11:49:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:492fcc73-049a-4940-9b39-8670f78e1104</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Steve,&lt;/p&gt;
&lt;p&gt;I am not sure that we have these right now, but I will just ask around and confirm this. But you could combine the button detection with timers so as to detect a long press or double click etc. You can try a similar implementation &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/90549/detecting-single-press-double-press-and-long-press-using-a-single-button"&gt;as mentioned in this ticket&lt;/a&gt;, but for the nRF Connect SDK.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>