<?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>Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82279/toggle-led-with-gpiote-interrupt</link><description>Hi, I am using Mesh v4.2.0 and nRF52840 light_lightness example but instead of button_event_handler, I am using GPIOTE to control the lights. 
 I want to toggle one LED with one button, say when I press button 1, LED 1 will turn on, and when I press button</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Dec 2021 13:55:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82279/toggle-led-with-gpiote-interrupt" /><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/343428?ContentTypeID=1</link><pubDate>Tue, 14 Dec 2021 13:55:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35346d5a-6cfb-40de-a375-d9e9850af66e</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;What I meant is that you should use the light switch server example as a reference and implement the same functionality in the Light_lightness example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/343422?ContentTypeID=1</link><pubDate>Tue, 14 Dec 2021 13:34:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3101bcd6-a289-453b-a25e-4cec7bbdb121</guid><dc:creator>lim zhi</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What if I am using the original light_lightness example. How do I then send a STATUS message from server to client?&lt;/p&gt;
&lt;p&gt;So when I press button 1 and LED1 lights up, server will send a &amp;#39;1&amp;#39; message to client. Similarly, when I press button 2 and LED1 turns off, server will send a &amp;#39;0&amp;#39; message to client.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/343234?ContentTypeID=1</link><pubDate>Mon, 13 Dec 2021 14:41:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5f42c07-e91f-4fc4-a56c-5574d0c7344c</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Like I mentioned in my previuos reply, you can see how this is done in the Light switch server example. You don&amp;#39;t have to add all the files, just include the seimple_hal module to handle the buttons. Like Hung mentions in the post I referred to:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;You need to include simple_hal.c to your project just like in the light switch example.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Then you need to call&amp;nbsp;ERROR_CHECK(hal_buttons_init(button_event_handler)); inside intialize() function. &amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/342807?ContentTypeID=1</link><pubDate>Fri, 10 Dec 2021 05:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c3c19b4-46f2-43a2-8fb2-a9e8e0db7c4a</guid><dc:creator>lim zhi</dc:creator><description>&lt;p&gt;Hi, thank you for the help.&lt;/p&gt;
&lt;p&gt;Now I want to know how to send the STATUS message from server to client. Do I have to add all the files from light switch example into light lightness example? Is there any other posts that can help me with this?&lt;/p&gt;
&lt;p&gt;To be more specific: when I press button 1 and LED1 lights up, I want to send a STATUS message to client saying that LED1 is on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/342593?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 17:00:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a4fb036-c78b-47ef-b795-ca0b6205b45c</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suggest you have a look at the light switch server example. Inside the button_event_handler() you can see how it is done, pressing a button to toggle the LED state and trigger the STATUS message to inform client about the state change&amp;nbsp;&amp;nbsp;You need to include simple_hal.c to your project just like in the light switch example first because the light lightness setup server example does not use the simple_hal module. So&amp;nbsp;you cannot use buttons on the light lightness server by default.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67337/i-am-using-nrf52832-board-to-un-provision-the-device-using-the-button-from-the-hardware-how-to-configure-this" rel="noopener noreferrer" target="_blank"&gt;This&lt;/a&gt;&amp;nbsp;might also be helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/342193?ContentTypeID=1</link><pubDate>Tue, 07 Dec 2021 00:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0085a01-22b8-4ec3-9dba-cb3a66b77160</guid><dc:creator>lim zhi</dc:creator><description>[quote userid="15475" url="~/f/nordic-q-a/82279/toggle-led-with-gpiote-interrupt/341880#341880"]do you want to toggle a LED by physically pressing a button or using GPIOTE?[/quote]
&lt;p&gt;I want to toggle a LED by physically pressing a button.&lt;/p&gt;
[quote userid="15475" url="~/f/nordic-q-a/82279/toggle-led-with-gpiote-interrupt/341880#341880"]Can you provide more details what you are trying to do? [/quote]
&lt;p&gt;So I want to toggle LED using a button on light_lightness server example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/342096?ContentTypeID=1</link><pubDate>Mon, 06 Dec 2021 13:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97b3de96-b439-4246-ad87-56dff52ef185</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you also answer my other questions as well?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/341957?ContentTypeID=1</link><pubDate>Sun, 05 Dec 2021 11:53:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:425e2447-6769-4cd8-b09a-5996466e5c12</guid><dc:creator>lim zhi</dc:creator><description>&lt;p&gt;Hi, sorry for the late reply.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/light_5F00_server.zip"&gt;devzone.nordicsemi.com/.../light_5F00_server.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So this is the file I&amp;#39;m working on.&lt;/p&gt;
[quote userid="15475" url="~/f/nordic-q-a/82279/toggle-led-with-gpiote-interrupt/341880#341880"]What is working and what is not working?[/quote]
&lt;p&gt;In this code, when I press and hold button 1 the LED lits up and stays lit, but I do not want to hold the button for LED to stay lit.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle LED with GPIOTE interrupt</title><link>https://devzone.nordicsemi.com/thread/341880?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 12:57:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d79566bb-a474-491d-8a07-2152bd041f2f</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you provide more details what you are trying to do? What is working and what is not working? What have you tried so far?&lt;/p&gt;
[quote user=""]I want to toggle one LED with one button, say when I press button 1, LED 1 will turn on, and when I press button 1 again, LED 1 will turn off. How do I do that?&amp;nbsp;[/quote]
&lt;p&gt;I&amp;#39;m a bit confused by this, do you want to toggle a LED by physically pressing a button or using GPIOTE?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>