<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — How to use ESP8266 to control led strip]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1728&amp;type=atom" />
	<updated>2023-12-15T19:13:58Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=1728</id>
		<entry>
			<title type="html"><![CDATA[Re: How to use ESP8266 to control led strip]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=5277#p5277" />
			<content type="html"><![CDATA[<p>A to jest kod który próbuję wsadzić do kodu z REMOTEXY Używa na NEOPIXEL</p><br /><p>#include &lt;Adafruit_NeoPixel.h&gt;<br />#ifdef __AVR__<br /> #include &lt;avr/power.h&gt;<br />#endif</p><br /><br /><p>#define LED_PIN&nbsp; &nbsp;6<br />#define LED_COUNT 3</p><br /><br /><p>Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);<br />void setup() {<br />#if defined(__AVR_ATtiny85__) &amp;&amp; (F_CPU == 16000000)<br />&nbsp; clock_prescale_set(clock_div_1);<br />#endif<br />&nbsp; strip.begin();&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; strip.show();&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; strip.setBrightness(50);<br />}</p><br /><br /><p>void loop() {<br />&nbsp; rainbow(10);<br />}</p><br /><br /><p>void colorWipe(uint32_t color, int wait) {<br />&nbsp; for(int i=0; i&lt;strip.numPixels(); i++) {<br />&nbsp; &nbsp; strip.setPixelColor(i, color);<br />&nbsp; &nbsp; strip.show();<br />&nbsp; &nbsp; delay(wait);<br />&nbsp; }<br />}</p><br /><br /><p>void theaterChase(uint32_t color, int wait) {<br />&nbsp; for(int a=0; a&lt;10; a++) {<br />&nbsp; &nbsp; for(int b=0; b&lt;3; b++) {<br />&nbsp; &nbsp; &nbsp; strip.clear();<br />&nbsp; &nbsp; &nbsp; for(int c=b; c&lt;strip.numPixels(); c += 3) {<br />&nbsp; &nbsp; &nbsp; &nbsp; strip.setPixelColor(c, color);<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; strip.show();<br />&nbsp; &nbsp; &nbsp; delay(wait);<br />&nbsp; &nbsp; }<br />&nbsp; }<br />}</p><br /><br /><p>void rainbow(int wait) {<br />&nbsp; for(long firstPixelHue = 0; firstPixelHue &lt; 5*65536; firstPixelHue += 256) {<br />&nbsp; &nbsp; strip.rainbow(firstPixelHue);<br />&nbsp; &nbsp; strip.show();<br />&nbsp; &nbsp; delay(wait);<br />&nbsp; }<br />}</p>]]></content>
			<author>
				<name><![CDATA[Arlemowy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2617</uri>
			</author>
			<updated>2023-12-15T19:13:58Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=5277#p5277</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to use ESP8266 to control led strip]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=5276#p5276" />
			<content type="html"><![CDATA[<p>Domyślnie miałem taki kod wygenerowany przez REMOTEXY</p><p>#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT<br />#include &lt;ESP8266WiFi.h&gt;<br />#include &lt;RemoteXY.h&gt;</p><br /><br /><p>#define REMOTEXY_WIFI_SSID &quot;LED&quot;<br />#define REMOTEXY_WIFI_PASSWORD &quot;12345678&quot;<br />#define REMOTEXY_SERVER_PORT 6377</p><br /><br /><p>#pragma pack(push, 1)<br />uint8_t RemoteXY_CONF[] =<br />&nbsp; { 255,4,0,0,0,19,0,16,147,1,6,0,22,66,20,20,78,8,3,131,<br />&nbsp; 20,12,22,8,64,26 };<br />struct {<br />&nbsp; uint8_t rgb_1_r; // =0..255 Red color value <br />&nbsp; uint8_t rgb_1_g; // =0..255 Green color value <br />&nbsp; uint8_t rgb_1_b; // =0..255 Blue color value <br />&nbsp; uint8_t Tryby; // =0 if select position A, =1 if position B, =2 if position C, ... <br />&nbsp; uint8_t connect_flag;&nbsp; // =1 if wire connected, else =0 <br />} RemoteXY;<br />#pragma pack(pop)</p><br /><br /><p>void setup() <br />{<br />&nbsp; RemoteXY_Init (); <br />&nbsp; </p><br /><br /><p>&nbsp; <br />}</p><br /><br /><p>void loop() <br />{ <br />&nbsp; RemoteXY_Handler ();</p> <br /><p>&nbsp; <br />}</p>]]></content>
			<author>
				<name><![CDATA[Arlemowy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2617</uri>
			</author>
			<updated>2023-12-15T19:12:03Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=5276#p5276</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to use ESP8266 to control led strip]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=5275#p5275" />
			<content type="html"><![CDATA[<p>How to use ESP8266 to control led strip something I tried to do such a code I did so far everything should work but the phone does not see my LED network</p><br /><p>#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT<br />#include &lt;ESP8266WiFi.h&gt;<br />#include &lt;RemoteXY.h&gt;<br />#include &lt;Adafruit_NeoPixel.h&gt;<br />#ifdef __AVR__<br /> #include &lt;avr/power.h&gt;<br />#endif</p><br /><br /><p>#define REMOTEXY_WIFI_SSID &quot;LED&quot;<br />#define REMOTEXY_WIFI_PASSWORD &quot;12345678&quot;<br />#define REMOTEXY_SERVER_PORT 6377</p><p>#define LED_PIN&nbsp; &nbsp;6<br />#define LED_COUNT 3</p><br /><br /><p>#pragma pack(push, 1)<br />uint8_t RemoteXY_CONF[] =<br />&nbsp; { 255,4,0,0,0,19,0,16,147,1,6,0,22,66,20,20,78,8,3,131,<br />&nbsp; 20,12,22,8,64,26 };<br />struct {<br />&nbsp; uint8_t rgb_1_r;<br />&nbsp; uint8_t rgb_1_g;<br />&nbsp; uint8_t rgb_1_b;<br />&nbsp; uint8_t Mode;<br />&nbsp; uint8_t connect_flag;<br />} RemoteXY;<br />#pragma pack(pop)</p><br /><br /><p>Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);<br />void setup() <br />{<br />&nbsp; #if defined(__AVR_ATtiny85__) &amp;&amp; (F_CPU == 16000000)<br />&nbsp; clock_prescale_set(clock_div_1);<br />#endif<br />&nbsp; strip.begin();&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; strip.show();&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; strip.setBrightness(50);<br />&nbsp; <br />&nbsp; RemoteXY_Init (); <br />&nbsp; Serial.begin(9600);<br />&nbsp; Serial.print(&quot;Start&quot;);<br />}</p><br /><br /><p>void loop() <br />{ <br />&nbsp; RemoteXY_Handler ();<br />&nbsp; //Serial.println(RemoteXY.rgb_1_r);<br />&nbsp; //Serial.println(RemoteXY.rgb_1_g);<br />&nbsp; //Serial.println(RemoteXY.rgb_1_b);<br />&nbsp; //Serial.println(RemoteXY.Mode);<br />&nbsp; <br />&nbsp; rainbow(10);<br />}</p><br /><br /><p>void colorWipe(uint32_t color, int wait) {<br />&nbsp; for(int i=0; i&lt;strip.numPixels(); i++) {<br />&nbsp; &nbsp; strip.setPixelColor(i, color);<br />&nbsp; &nbsp; strip.show();<br />&nbsp; &nbsp; RemoteXY_delay(wait);<br />&nbsp; }<br />}</p><br /><p>void theaterChase(uint32_t color, int wait) {<br />&nbsp; for(int a=0; a&lt;10; a++) {<br />&nbsp; &nbsp; for(int b=0; b&lt;3; b++) {<br />&nbsp; &nbsp; &nbsp; strip.clear();<br />&nbsp; &nbsp; &nbsp; for(int c=b; c&lt;strip.numPixels(); c += 3) {<br />&nbsp; &nbsp; &nbsp; &nbsp; strip.setPixelColor(c, color);<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; strip.show();<br />&nbsp; &nbsp; &nbsp; RemoteXY_delay(wait);<br />&nbsp; &nbsp; }<br />&nbsp; }<br />}</p><br /><p>void rainbow(int wait) {<br />&nbsp; for(long firstPixelHue = 0; firstPixelHue &lt; 5*65536; firstPixelHue += 256) {<br />&nbsp; &nbsp; strip.rainbow(firstPixelHue);<br />&nbsp; &nbsp; strip.show();<br />&nbsp; &nbsp; RemoteXY_delay(wait);<br />&nbsp; }<br />}</p>]]></content>
			<author>
				<name><![CDATA[Arlemowy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2617</uri>
			</author>
			<updated>2023-12-15T19:09:35Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=5275#p5275</id>
		</entry>
</feed>
