<?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>Using the generic on/off server model to write D1 pin 0/1 instead of BSP_LED</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54214/using-the-generic-on-off-server-model-to-write-d1-pin-0-1-instead-of-bsp_led</link><description>I would like to set or clear a digital pin when the button is pressed. 
 I seen to have achieved this with the on-board button but it doesn&amp;#39;t work with a mesh switch. 
 
 I need help with a sample code.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Nov 2019 13:24:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54214/using-the-generic-on-off-server-model-to-write-d1-pin-0-1-instead-of-bsp_led" /><item><title>RE: Using the generic on/off server model to write D1 pin 0/1 instead of BSP_LED</title><link>https://devzone.nordicsemi.com/thread/219900?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 13:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:432a47fc-4e47-4853-9474-3119c4e7da4c</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;You will need to look at the&amp;nbsp;&lt;span&gt;callback app_onoff_server_set_cb(), and change it from the LED to the PIN you want to control.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the generic on/off server model to write D1 pin 0/1 instead of BSP_LED</title><link>https://devzone.nordicsemi.com/thread/219831?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 08:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a9c79c1-4658-444f-a2fb-2e91d008057b</guid><dc:creator>Mastsrcard</dc:creator><description>&lt;p&gt;I can set/clear D1 with the on board button, but using the&amp;nbsp;light switch example, the button on the mesh switch (Client) does not control D1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the generic on/off server model to write D1 pin 0/1 instead of BSP_LED</title><link>https://devzone.nordicsemi.com/thread/219828?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 08:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1e14eea-e2d7-45fc-9fc7-6910c9a26d50</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]it doesn&amp;#39;t work with a mesh switch[/quote]
&lt;p&gt;What do you mean by this? What doesn&amp;#39;t work?&lt;/p&gt;
&lt;p&gt;I would suggest you have a look at the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.2.0/md_examples_light_switch_README.html?cp=5_2_3_0" rel="noopener noreferrer" target="_blank"&gt;Light switch example&lt;/a&gt;. On the server example,&amp;nbsp;have a look at&amp;nbsp;the&amp;nbsp;callback app_onoff_server_set_cb().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>