<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — play click buzzer with Switch control]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=271&amp;type=atom" />
	<updated>2017-09-30T22:42:39Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=271</id>
		<entry>
			<title type="html"><![CDATA[Re: play click buzzer with Switch control]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=957#p957" />
			<content type="html"><![CDATA[<p><img src="https://forum.remotexy.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[Guillaume]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=23</uri>
			</author>
			<updated>2017-09-30T22:42:39Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=957#p957</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: play click buzzer with Switch control]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=956#p956" />
			<content type="html"><![CDATA[<p>Many thanks for you&nbsp; it is finaly working,</p>]]></content>
			<author>
				<name><![CDATA[husseinsalah76]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=416</uri>
			</author>
			<updated>2017-09-30T22:13:48Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=956#p956</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: play click buzzer with Switch control]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=954#p954" />
			<content type="html"><![CDATA[<p>You should only use digitalWrite when the value of the switch has changed.</p><div class="codebox"><pre><code>void loop()
{
    static uint8_t switch_2_prev = RemoteXY.switch_2;
    if ( switch_2_prev != RemoteXY.switch_2 )
    {
        switch_2_prev = RemoteXY.switch_2;
        digitalWrite(PIN_SWITCH_2, (RemoteXY.switch_2==0)?HIGH:LOW);
        PLAYTONE();
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Guillaume]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=23</uri>
			</author>
			<updated>2017-09-30T13:01:22Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=954#p954</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: play click buzzer with Switch control]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=953#p953" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Guillaume wrote:</cite><blockquote><p>At least show your code so we can see where you are stuck at.</p></blockquote></div><p>Iwant just to play tone when switch On or OFF<br />&nbsp; &nbsp;</p><p>//////////////////////////////////////////////<br />//&nbsp; &nbsp; &nbsp; &nbsp; RemoteXY include library&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //<br />//////////////////////////////////////////////</p><p>// RemoteXY select connection mode and include library <br />#define REMOTEXY_MODE__SOFTSERIAL<br />#include &lt;SoftwareSerial.h&gt;</p><p>#include &lt;RemoteXY.h&gt;</p><p>// RemoteXY connection settings <br />#define REMOTEXY_SERIAL_RX 0<br />#define REMOTEXY_SERIAL_TX 1<br />#define REMOTEXY_SERIAL_SPEED 9600</p><br /><p>// RemoteXY configurate&nbsp; <br />#pragma pack(push, 1)<br />uint8_t RemoteXY_CONF[] =<br />&nbsp; &nbsp; { 255,8,0,0,0,139,0,6,5,1,<br />&nbsp; 2,0,4,4,20,7,2,79,78,0,<br />&nbsp; 79,70,70,0,2,0,4,14,20,7,<br />&nbsp; 2,79,78,0,79,70,70,0,2,0,<br />&nbsp; 4,24,20,7,2,79,78,0,79,70,<br />&nbsp; 70,0,2,0,4,34,20,7,2,79,<br />&nbsp; 78,0,79,70,70,0,2,0,4,44,<br />&nbsp; 20,7,2,79,78,0,79,70,70,0,<br />&nbsp; 2,0,4,54,20,7,2,79,78,0,<br />&nbsp; 79,70,70,0,2,0,4,64,20,7,<br />&nbsp; 2,79,78,0,79,70,70,0,2,0,<br />&nbsp; 4,74,20,7,2,79,78,0,79,70,<br />&nbsp; 70,0,129,0,28,5,18,5,0,82,<br />&nbsp; 111,111,109,32,78,111,46,49,0,130,<br />&nbsp; 0,27,4,29,6,8 };&nbsp; <br />&nbsp; <br />// this structure defines all the variables of your control interface <br />struct {</p><p>&nbsp; &nbsp; // input variable<br />&nbsp; uint8_t switch_2; // =1 if switch ON and =0 if OFF <br />&nbsp; uint8_t switch_3; // =1 if switch ON and =0 if OFF <br />&nbsp; uint8_t switch_4; // =1 if switch ON and =0 if OFF <br />&nbsp; uint8_t switch_5; // =1 if switch ON and =0 if OFF <br />&nbsp; uint8_t switch_6; // =1 if switch ON and =0 if OFF <br />&nbsp; uint8_t switch_7; // =1 if switch ON and =0 if OFF <br />&nbsp; uint8_t switch_8; // =1 if switch ON and =0 if OFF <br />&nbsp; uint8_t switch_9; // =1 if switch ON and =0 if OFF </p><p>&nbsp; &nbsp; // other variable<br />&nbsp; uint8_t connect_flag;&nbsp; // =1 if wire connected, else =0 </p><p>} RemoteXY;<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_SWITCH_2 2<br />#define PIN_SWITCH_3 3<br />#define PIN_SWITCH_4 4<br />#define PIN_SWITCH_5 5<br />#define PIN_SWITCH_6 6<br />#define PIN_SWITCH_7 7<br />#define PIN_SWITCH_8 8<br />#define PIN_SWITCH_9 9</p><p>void setup() <br />{<br />&nbsp; RemoteXY_Init (); <br />&nbsp; <br />&nbsp; pinMode (PIN_SWITCH_2, OUTPUT);<br />&nbsp; pinMode (PIN_SWITCH_3, OUTPUT);<br />&nbsp; pinMode (PIN_SWITCH_4, OUTPUT);<br />&nbsp; pinMode (PIN_SWITCH_5, OUTPUT);<br />&nbsp; pinMode (PIN_SWITCH_6, OUTPUT);<br />&nbsp; pinMode (PIN_SWITCH_7, OUTPUT);<br />&nbsp; pinMode (PIN_SWITCH_8, OUTPUT);<br />&nbsp; pinMode (PIN_SWITCH_9, OUTPUT);</p><p>&nbsp; &nbsp;<br />&nbsp; // TODO you setup code</p><p>&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<br />}</p><p>void loop() <br />{ <br />&nbsp; RemoteXY_Handler ();<br />&nbsp; <br />&nbsp; digitalWrite(PIN_SWITCH_2, (RemoteXY.switch_2==0)?HIGH:LOW);<br />&nbsp; digitalWrite(PIN_SWITCH_3, (RemoteXY.switch_3==0)?HIGH:LOW);<br />&nbsp; digitalWrite(PIN_SWITCH_4, (RemoteXY.switch_4==0)?HIGH:LOW);<br />&nbsp; digitalWrite(PIN_SWITCH_5, (RemoteXY.switch_5==0)?HIGH:LOW);<br />&nbsp; digitalWrite(PIN_SWITCH_6, (RemoteXY.switch_6==0)?HIGH:LOW);<br />&nbsp; digitalWrite(PIN_SWITCH_7, (RemoteXY.switch_7==0)?HIGH:LOW);<br />&nbsp; digitalWrite(PIN_SWITCH_8, (RemoteXY.switch_8==0)?HIGH:LOW);<br />&nbsp; digitalWrite(PIN_SWITCH_9, (RemoteXY.switch_9==0)?HIGH:LOW);</p><p>&nbsp; // TODO you loop code<br />&nbsp; // use the RemoteXY structure for data transfer</p><br /><p>}</p>]]></content>
			<author>
				<name><![CDATA[husseinsalah76]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=416</uri>
			</author>
			<updated>2017-09-30T03:21:19Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=953#p953</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: play click buzzer with Switch control]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=952#p952" />
			<content type="html"><![CDATA[<p>At least show your code so we can see where you are stuck at.</p>]]></content>
			<author>
				<name><![CDATA[Guillaume]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=23</uri>
			</author>
			<updated>2017-09-30T01:29:39Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=952#p952</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: play click buzzer with Switch control]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=950#p950" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Guillaume wrote:</cite><blockquote><p>Hello,</p><p>This forum is about RemoteXY, which you know how to use, since you know how to control relays with it. You need help with something that isn&#039;t related to RemoteXY.</p><p>You should search on google for a non blocking tone library for your platform. There will be examples on how to play tones, then you just copy the example and play the tone when the relay state changed.</p><p>If you still need help, then you should ask on arduino forum or whatever platform you are using, where there will be many more people able to help you than here <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></blockquote></div><p>Thanks for reply, l understood that this forum related to RemoteXY, l already google it but the results not reach to my requirements therefore i think that is can be solved by this forum,<br />Best regards </p>]]></content>
			<author>
				<name><![CDATA[husseinsalah76]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=416</uri>
			</author>
			<updated>2017-09-29T18:18:48Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=950#p950</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: play click buzzer with Switch control]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=948#p948" />
			<content type="html"><![CDATA[<p>Hello,</p><p>This forum is about RemoteXY, which you know how to use, since you know how to control relays with it. You need help with something that isn&#039;t related to RemoteXY.</p><p>You should search on google for a non blocking tone library for your platform. There will be examples on how to play tones, then you just copy the example and play the tone when the relay state changed.</p><p>If you still need help, then you should ask on arduino forum or whatever platform you are using, where there will be many more people able to help you than here <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Guillaume]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=23</uri>
			</author>
			<updated>2017-09-29T09:54:09Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=948#p948</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[play click buzzer with Switch control]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=947#p947" />
			<content type="html"><![CDATA[<p>hi,<br />i alredy using remoteXY for contol eight switchs using eight channel relay modules, i would like to play tone click when use the switch on/off control,&nbsp; &nbsp;what is the suitable code to play click ton through buzzer</p>]]></content>
			<author>
				<name><![CDATA[husseinsalah76]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=416</uri>
			</author>
			<updated>2017-09-29T09:22:54Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=947#p947</id>
		</entry>
</feed>
