<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — Умная розетка, кнопка включить всё]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1807</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1807&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Умная розетка, кнопка включить всё.]]></description>
		<lastBuildDate>Mon, 03 Jun 2024 08:00:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Умная розетка, кнопка включить всё]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5559#p5559</link>
			<description><![CDATA[<p>Что бы перерисовывались нужно добавить дополнительный код который будет управлять не только пинами но и состоянием кнопок<br /></p><div class="codebox"><pre><code>void loop()
{
  RemoteXY_Handler ();

  if (RemoteXY.All != 0) {
    digitalWrite(PIN_AMPLIFER, HIGH);
    digitalWrite(PIN_DAC, HIGH);
    digitalWrite(PIN_COMP, HIGH);
    digitalWrite(PIN_TV, HIGH);
    if (RemoteXY.Amplifer==0) RemoteXY.Amplifer = 1;
    if (RemoteXY.DAC==0) RemoteXY.DAC= 1;
    if (RemoteXY.COMP==0) RemoteXY.COMP= 1;
    if (RemoteXY.TV==0) RemoteXY.TV= 1;
  }
  else {
    digitalWrite(PIN_AMPLIFER, (RemoteXY.Amplifer==0)?LOW:HIGH);
    digitalWrite(PIN_DAC, (RemoteXY.DAC==0)?LOW:HIGH);
    digitalWrite(PIN_COMP, (RemoteXY.COMP==0)?LOW:HIGH);
    digitalWrite(PIN_TV, (RemoteXY.TV==0)?LOW:HIGH);
  }


}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Mon, 03 Jun 2024 08:00:52 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5559#p5559</guid>
		</item>
		<item>
			<title><![CDATA[Re: Умная розетка, кнопка включить всё]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5546#p5546</link>
			<description><![CDATA[<p>Не, фигня, кнопки не перерисовываются под новое состояние. Ладно, обойдусь.<br />Но проект классный, создателям респектище!</p>]]></description>
			<author><![CDATA[null@example.com (Owner)]]></author>
			<pubDate>Fri, 24 May 2024 15:32:29 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5546#p5546</guid>
		</item>
		<item>
			<title><![CDATA[Re: Умная розетка, кнопка включить всё]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5545#p5545</link>
			<description><![CDATA[<div class="codebox"><pre><code>void loop()
{
  RemoteXY_Handler ();

  if (RemoteXY.All != 0) {
    digitalWrite(PIN_AMPLIFER, HIGH);
    digitalWrite(PIN_DAC, HIGH);
    digitalWrite(PIN_COMP, HIGH);
    digitalWrite(PIN_TV, HIGH);
  }
  else {
    digitalWrite(PIN_AMPLIFER, (RemoteXY.Amplifer==0)?LOW:HIGH);
    digitalWrite(PIN_DAC, (RemoteXY.DAC==0)?LOW:HIGH);
    digitalWrite(PIN_COMP, (RemoteXY.COMP==0)?LOW:HIGH);
    digitalWrite(PIN_TV, (RemoteXY.TV==0)?LOW:HIGH);
  }


}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Fri, 24 May 2024 07:02:01 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5545#p5545</guid>
		</item>
		<item>
			<title><![CDATA[Умная розетка, кнопка включить всё]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5544#p5544</link>
			<description><![CDATA[<p>Я не разобрался, сорян. Подскажите что добавить чтобы кнопкой включались сразу несколько реле, или сразу все.<br />Я сделал кнопку All (D8) но я хочу чтобы она все реле включила. Ну и для примера чтобы включила D2 и D6.<br />Что надо добавить в скетч?</p><p>#define REMOTEXY_MODE__ESP8266WIFI_LIB</p><p>#include &lt;ESP8266WiFi.h&gt;</p><p>// настройки соединения <br />#define REMOTEXY_WIFI_SSID &quot;YOUR_SSID&quot;<br />#define REMOTEXY_WIFI_PASSWORD &quot;YOUR_PASS&quot;<br />#define REMOTEXY_SERVER_PORT 6377</p><br /><p>#include &lt;RemoteXY.h&gt;</p><p>// конфигурация интерфейса RemoteXY&nbsp; <br />#pragma pack(push, 1)&nbsp; <br />uint8_t RemoteXY_CONF[] =&nbsp; &nbsp;// 144 bytes<br />&nbsp; { 255,5,0,0,0,137,0,17,0,0,0,180,1,106,200,1,1,5,0,10,<br />&nbsp; 18,8,70,28,49,4,36,31,65,109,112,32,79,78,0,31,65,77,80,32,<br />&nbsp; 79,70,70,0,10,19,43,69,29,49,4,36,31,68,65,67,32,79,78,0,<br />&nbsp; 31,68,65,67,32,79,70,70,0,10,19,79,69,28,49,4,36,31,67,111,<br />&nbsp; 109,112,32,79,78,0,31,67,79,77,80,32,79,70,70,0,10,19,115,68,<br />&nbsp; 26,49,4,36,31,84,86,32,79,78,0,31,84,86,32,79,70,70,0,10,<br />&nbsp; 20,148,67,27,49,4,36,31,65,108,108,32,79,78,0,31,65,76,76,32,<br />&nbsp; 79,70,70,0 };<br />&nbsp; <br />// структура определяет все переменные и события вашего интерфейса управления <br />struct {</p><p>&nbsp; &nbsp; // input variables<br />&nbsp; uint8_t Amplifer; // =1 если включено, иначе =0<br />&nbsp; uint8_t DAC; // =1 если включено, иначе =0<br />&nbsp; uint8_t COMP; // =1 если включено, иначе =0<br />&nbsp; uint8_t TV; // =1 если включено, иначе =0<br />&nbsp; uint8_t All; // =1 если включено, иначе =0</p><p>&nbsp; &nbsp; // other variable<br />&nbsp; uint8_t connect_flag;&nbsp; // =1 if wire connected, else =0</p><p>} RemoteXY;&nbsp; &nbsp;<br />#pragma pack(pop)</p><p>/////////////////////////////////////////////<br />//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END RemoteXY include&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //<br />/////////////////////////////////////////////</p><p>#define PIN_AMPLIFER D2<br />#define PIN_DAC D5<br />#define PIN_COMP D6<br />#define PIN_TV D7<br />#define PIN_ALL D8</p><br /><p>void setup() <br />{<br />&nbsp; RemoteXY_Init (); <br />&nbsp; <br />&nbsp; pinMode (PIN_AMPLIFER, OUTPUT);<br />&nbsp; pinMode (PIN_DAC, OUTPUT);<br />&nbsp; pinMode (PIN_COMP, OUTPUT);<br />&nbsp; pinMode (PIN_TV, OUTPUT);<br />&nbsp; pinMode (PIN_ALL, OUTPUT);<br />&nbsp; <br />&nbsp; // TODO you setup code<br />&nbsp; <br />}</p><p>void loop() <br />{ <br />&nbsp; RemoteXY_Handler ();<br />&nbsp; <br />&nbsp; digitalWrite(PIN_AMPLIFER, (RemoteXY.Amplifer==0)?LOW:HIGH);<br />&nbsp; digitalWrite(PIN_DAC, (RemoteXY.DAC==0)?LOW:HIGH);<br />&nbsp; digitalWrite(PIN_COMP, (RemoteXY.COMP==0)?LOW:HIGH);<br />&nbsp; digitalWrite(PIN_TV, (RemoteXY.TV==0)?LOW:HIGH);<br />&nbsp; digitalWrite(PIN_ALL, (RemoteXY.All==0)?LOW:HIGH);<br />&nbsp; <br />&nbsp; // TODO you loop code</p><p>}</p>]]></description>
			<author><![CDATA[null@example.com (Owner)]]></author>
			<pubDate>Wed, 22 May 2024 16:33:57 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5544#p5544</guid>
		</item>
	</channel>
</rss>
