<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — push button and timer]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1512</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1512&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in push button and timer.]]></description>
		<lastBuildDate>Mon, 04 Jul 2022 21:19:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: push button and timer]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4724#p4724</link>
			<description><![CDATA[<p>Thank You for your help... I&#039;ll be working on it this week!!!</p>]]></description>
			<author><![CDATA[null@example.com (dmccullough30)]]></author>
			<pubDate>Mon, 04 Jul 2022 21:19:19 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4724#p4724</guid>
		</item>
		<item>
			<title><![CDATA[Re: push button and timer]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4706#p4706</link>
			<description><![CDATA[<div class="codebox"><pre><code>uint8_t button_1;             // =1 if switch ON and =0 if OFF -RemoteXY

const int LED_1_PIN = 5;

unsigned long ledTimer = 0;
unsigned int ledTimeOn = 5000;  //Time on for LED

void setup()
{
  pinMode(LED_1_PIN, OUTPUT);
}

void loop()
{
  if (ledTimer == 0)
  {
    // Add more buttons below, could be done in an array for simplifying
    if (RemoteXY.button_1 == 1)
    {
      ledTimer = millis();
      digitalWrite(LED_1_PIN, HIGH);
    }
  }
  if (ledTimer &gt; 0)
  {
    if (millis() - ledTimer &gt;= ledTimeOn)
    {
      // Add more buttons below, could be done in an array for simplifying
      if (RemoteXY.button_1 == 1)
      {
        ledTimer = 0;
        digitalWrite(LED_1_PIN, LOW);
        RemoteXY.button_1 = 0;
      }
    }
  }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (jhome0005)]]></author>
			<pubDate>Wed, 29 Jun 2022 13:08:52 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4706#p4706</guid>
		</item>
		<item>
			<title><![CDATA[push button and timer]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4704#p4704</link>
			<description><![CDATA[<p>I want to set 8 buttons up that allow me to set up a timer for each one. Once pushed on the others are ignored until the timer reaches zero. Then I want the button to revert back to the &quot;off&quot; color or its original state on the phone. I can successfully use the on off switch to control the LED but I have to manually turn it off on the phone. Suggestions??</p>]]></description>
			<author><![CDATA[null@example.com (dmccullough30)]]></author>
			<pubDate>Tue, 28 Jun 2022 19:45:41 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4704#p4704</guid>
		</item>
	</channel>
</rss>
