<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Lego Millenium Falcon with All LEDStrip effects in one (FastLED) - Arduino				            </title>
            <link>https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/</link>
            <description>Tweaking4All.com Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Mon, 16 Mar 2026 23:57:26 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Lego Millenium Falcon with All LEDStrip effects in one (FastLED)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2472</link>
                        <pubDate>Wed, 19 Aug 2020 11:30:05 +0000</pubDate>
                        <description><![CDATA[Awesome haha - I think we just did about the same thing 😊]]></description>
                        <content:encoded><![CDATA[<p>Awesome haha - I think we just did about the same thing 😊 </p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2472</guid>
                    </item>
				                    <item>
                        <title>RE: Lego Millenium Falcon with All LEDStrip effects in one (FastLED)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2471</link>
                        <pubDate>Wed, 19 Aug 2020 11:29:40 +0000</pubDate>
                        <description><![CDATA[Whatever I try (not to mention the numerous locations where one can set the max upload size) uploading keeps failing. I did notice you already did a great job at compressing it. So I did bri...]]></description>
                        <content:encoded><![CDATA[<p>Whatever I try (not to mention the numerous locations where one can set the max upload size) uploading keeps failing. I did notice you already did a great job at compressing it. So I did bring it down from 1080p to 720p.</p>
70]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2471</guid>
                    </item>
				                    <item>
                        <title>RE: Lego Millenium Falcon with All LEDStrip effects in one (FastLED)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2470</link>
                        <pubDate>Wed, 19 Aug 2020 11:25:52 +0000</pubDate>
                        <description><![CDATA[@hansi have shrinked it to &lt;10mb:]]></description>
                        <content:encoded><![CDATA[<p>@hansi have shrinked it to &lt;10mb: http://www.altiparmak.de/privat/diverses/eddy_klein.mp4</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>normen</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2470</guid>
                    </item>
				                    <item>
                        <title>RE: Lego Millenium Falcon with All LEDStrip effects in one (FastLED)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2469</link>
                        <pubDate>Wed, 19 Aug 2020 10:54:23 +0000</pubDate>
                        <description><![CDATA[Never mind the video question haha ... I totally missed that link. Sorry.
The video is 32Mb which is too big for the current settings. I&#039;m tinkering on it to get that fixed 😊 
I&#039;ve uploade...]]></description>
                        <content:encoded><![CDATA[<p>Never mind the video question haha ... I totally missed that link. Sorry.</p>
<p>The video is 32Mb which is too big for the current settings. I'm tinkering on it to get that fixed 😊 </p>
<p>I've uploaded the ino here (your account is to new to post attachments, I think it takes 5 posts to get the option to attach).</p>
69]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2469</guid>
                    </item>
				                    <item>
                        <title>RE: Lego Millenium Falcon with All LEDStrip effects in one (FastLED)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2468</link>
                        <pubDate>Wed, 19 Aug 2020 10:48:23 +0000</pubDate>
                        <description><![CDATA[@hansthe video is also in the linked post..
ino-file:
i dont know how to upload it here....]]></description>
                        <content:encoded><![CDATA[<p>@hansthe video is also in the linked post...http://www.altiparmak.de/privat/diverses/eddy.mp4</p>
<p>ino-file: http://www.altiparmak.de/privat/diverses/eddy_13.ino</p>
<p>i dont know how to upload it here....</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>normen</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2468</guid>
                    </item>
				                    <item>
                        <title>RE: Lego Millenium Falcon with All LEDStrip effects in one (FastLED)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2467</link>
                        <pubDate>Wed, 19 Aug 2020 10:33:54 +0000</pubDate>
                        <description><![CDATA[Hi Normen!
That&#039;s an awesome project! 👍 🤩 
I&#039;ve attached the images here (just for future reference, incase the linked pictures disappear).Any chance you can upload the code as an ino file...]]></description>
                        <content:encoded><![CDATA[<p>Hi Normen!</p>
<p>That's an awesome project! 👍 🤩 </p>
<p>I've attached the images here (just for future reference, incase the linked pictures disappear).<br />Any chance you can upload the code as an ino file? (if not: no worries, folks can copy it still from your post)</p>
<p>Do you have any video (or YouTube channel) to see it in action?</p>
65
66
67
68]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2467</guid>
                    </item>
				                    <item>
                        <title>Lego Millenium Falcon with All LEDStrip effects in one (FastLED)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2465</link>
                        <pubDate>Wed, 19 Aug 2020 10:24:50 +0000</pubDate>
                        <description><![CDATA[Here is my next project - the effects are taken from Effects
I don&#039;t know how to upload a video here - so here is a link : Video
Some pictures: Picture 1 Picture 2 Picture 3 Picture 4
 
...]]></description>
                        <content:encoded><![CDATA[<p>Here is my next project - the effects are taken from <a title="Original Source" href="https://www.tweaking4all.com/hardware/arduino/arduino-all-ledstrip-effects-in-one/" target="true">Effects</a></p>
<p>I don't know how to upload a video here - so here is a link : <a title="Lego Millenium Falcon - LED" href="http://www.altiparmak.de/privat/diverses/eddy.mp4" target="true">Video</a></p>
<p>Some pictures: <a title="Picture 1" href="http://www.altiparmak.de/privat/diverses/1.jpg" target="true">Picture 1</a> <a title="Picture 2" href="http://www.altiparmak.de/privat/diverses/2.jpg" target="true">Picture 2</a> <a title="Picture 3" href="http://www.altiparmak.de/privat/diverses/3.jpg" target="true">Picture 3</a> <a title="Picture 4" href="http://www.altiparmak.de/privat/diverses/4.jpg" target="true">Picture 4</a></p>
<p> </p>
<p>And the code:</p>
<p>//Stromaufnahme (gemessen) wenn alle 101 LEds weiß maximal leuchten: ca. 2,8A<br />//Version 12 ist final<br />//Millennium falke Normen Altiparmak</p>
<p>#include &lt;FastLED.h&gt;<br />#define LED_PIN 10 //Pin der Datenleitung zu dem LED-Strip<br />#define NUM_LEDS 101 //segmente (6*15)+ 2 antrieb+ 9 kanzel<br />//#define LED_TYPE WS2812B<br />//#define LED_TYPE WS2811<br />//#define LED_TYPE WS2801 - der definiert nicht<br />//#define LED_TYPE UCS1903 - der definiert nicht<br />#define LED_TYPE WS2812<br />#define COLOR_ORDER GRB</p>
<p>#define HELLIGKEITS_STUFE 20<br />#define MINIMALE_HELLIGKEIT 10<br />CRGB leds; //speichert die LED-Farbwerte<br />int status =-1;<br />int laststatus=-1;<br />volatile unsigned long alteZeit=0, entprellZeit=100; //fuer heller und dunkler verwendet<br />static unsigned long lastMillis = 0; //als einschlaftimer verwendet<br />int brightness = 100; //startwert<br />int temp = 0;<br />int tempbrightness=0;</p>
<p>unsigned char antriebblinkzaehler=0;<br />unsigned char antriebblinkteiler=0;</p>
<p>byte colors = { {0xff, 0x00, 0x00},{0xff, 0xff, 0xff}, {0x00, 0x00, 0xff} };</p>
<p>void setup()<br />{<br />Serial.begin(9600);<br />//configure pin 2 as an input and enable the internal pull-up resistor<br />pinMode(A0, INPUT_PULLUP);<br />pinMode(A1, INPUT_PULLUP);<br />pinMode(A2, INPUT_PULLUP);<br />pinMode(A3, INPUT_PULLUP);<br />pinMode(A4, INPUT_PULLUP);<br />pinMode(A5, INPUT_PULLUP);<br />pinMode( 8, INPUT_PULLUP);<br />pinMode( 9, INPUT_PULLUP);<br />pinMode(4, INPUT_PULLUP);<br />pinMode(5, INPUT_PULLUP);<br />pinMode(6, INPUT_PULLUP);<br />pinMode(7, INPUT_PULLUP);</p>
<p>pinMode(2, INPUT_PULLUP); //dunkler<br />pinMode(3, INPUT_PULLUP); //heller</p>
<p>//attachInterrupt(digitalPinToInterrupt(2), dunkler, FALLING);<br />//attachInterrupt(digitalPinToInterrupt(3), heller, FALLING);</p>
<p>attachInterrupt(digitalPinToInterrupt(2), dunkler, LOW);<br />attachInterrupt(digitalPinToInterrupt(3), heller, LOW);</p>
<p>FastLED.addLeds&lt;LED_TYPE,LED_PIN,COLOR_ORDER&gt;(leds, NUM_LEDS).setCorrection(TypicalLEDStrip); // initializes LED strip - vorne 256<br />setAll (255,255,255);<br />FastLED.setBrightness (brightness);<br />FastLED.show();</p>
<p>Serial.println("Startup Eddys Falke");</p>
<p><br />}</p>
<p>int readstatus ()<br />{<br />if (digitalRead(A0)==0) return 5; //<br />if (digitalRead(A1)==0) return 6; //<br />if (digitalRead(A2)==0) return 7; //<br />if (digitalRead(A3)==0) return 8; //<br />if (digitalRead(A4)==0) return 9; //<br />if (digitalRead(A5)==0) return 10; //<br />if (digitalRead( 8)==0) return 0; //<br />if (digitalRead( 9)==0) return 11; //<br />if (digitalRead( 4)==0) return 1; <br />if (digitalRead( 5)==0) return 2; //<br />if (digitalRead( 6)==0) return 3; //<br />if (digitalRead( 7)==0) return 4; //<br />return -1; <br />}</p>
<p>void dunkler()<br />{<br />if((millis() - alteZeit) &gt; entprellZeit) { <br />temp = brightness - HELLIGKEITS_STUFE;<br />if (temp&gt;HELLIGKEITS_STUFE) <br />{<br />brightness = brightness - HELLIGKEITS_STUFE;<br />FastLED.setBrightness (brightness);<br />}<br />else<br />{<br />brightness = MINIMALE_HELLIGKEIT;<br />FastLED.setBrightness (brightness);<br />}<br />alteZeit = millis(); // letzte Schaltzeit merken <br />}<br />}</p>
<p>void heller()<br />{<br />if((millis() - alteZeit) &gt; entprellZeit) { <br />// innerhalb der entprellZeit nichts machen<br />//Serial.println("heller");<br />temp = brightness + HELLIGKEITS_STUFE;<br />if (temp&lt;=255) <br />{<br />brightness = brightness + HELLIGKEITS_STUFE;<br />FastLED.setBrightness (brightness);<br />}<br />else<br />{<br />brightness = 255;<br />FastLED.setBrightness (brightness);<br />}<br />alteZeit = millis(); // letzte Schaltzeit merken <br />}<br />}</p>
<p>void dimout (int wartezeit)<br />{<br />for (tempbrightness=brightness;tempbrightness&gt;=0;tempbrightness--)<br />{<br />FastLED.setBrightness (tempbrightness);<br />FastLED.show();<br />delay (wartezeit);<br />}<br />delay (300);<br />}</p>
<p>void dimin (int wartezeit)<br />{<br />for (tempbrightness=0;brightness&gt;=tempbrightness;tempbrightness++)<br />{<br />FastLED.setBrightness (tempbrightness);<br />FastLED.show();<br />delay (wartezeit);<br />}<br />}</p>
<p><br />void loop()<br />{<br />status=readstatus();<br />if (status!=-1)<br />{<br />//FastLED.setBrightness (brightness); //am Ende jeder Funktion wird runtergedimmt - daher hier wieder anschalten<br />Serial.print("Status: ");<br />Serial.print(status, DEC);<br />Serial.print(" / Helligkeit: ");<br />Serial.println(brightness, DEC);</p>
<p>switch (status)<br />{<br />case 0: {<br />schlaflicht (0); //schlaflicht dimmt selbst aus<br />} break;<br />case 1: {<br />normaleslicht (1);<br />dimout(3);<br />} break;<br />case 2: {<br />NewKITT(2,0xff, 0x00, 0x00, 8, 5, 50);<br />dimout(3);<br />} break;<br />case 3: {<br />meteorRain(3,0xff,0xff,0xff,10, 64, true, 50);<br />//delay (1000);<br />dimout(3);<br />} break;<br />case 4: {<br />theaterChaseRainbow(4,60);<br />dimout(3);<br />} break;<br />case 5: {<br />Fire(5,55,120,15);<br />dimout(3);<br />} break;<br />case 6: {<br />TwinkleRandom(6,20, 100, false);<br />dimout(3);<br />} break;<br />case 7: {<br />rainbowCycle(7,50);<br />dimout(3);<br />} break;<br />case 8: {<br />zufall(8,5);<br />dimout(3);<br />} break;<br />case 9: {<br />SnowSparkle(9,0x10, 0x10, 0x10, 20, random(100,1000));<br />dimout(3);<br />} break;<br />case 10: {<br />RunningLights(10, 50); // blue<br />dimout(3);<br />} break;<br />case 11: {<br />BouncingColoredBalls(11,3, colors, true);<br />dimout(3);<br />} break;</p>
<p>}</p>
<p><br />}<br />}</p>
<p><br />void zufall (int auswahl, int warten)<br />{<br />setAll(0,0,0);<br />dimin(1);<br />while (1)<br />{<br />setPixel(random(NUM_LEDS), random8(), random8(), random8());<br />FastLED.show();<br />if (readstatus()!=auswahl) return; <br />delay(warten);<br /><br />}<br />}</p>
<p>void NewKITT(int auswahl, byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay){<br />setAllRing(0,0,0);<br />dimin(1);<br />RightToLeft(auswahl, red, green, blue, EyeSize, SpeedDelay, ReturnDelay);<br />LeftToRight(auswahl, red, green, blue, EyeSize, SpeedDelay, ReturnDelay);<br />OutsideToCenter(auswahl, red, green, blue, EyeSize, SpeedDelay, ReturnDelay);<br />CenterToOutside(auswahl, red, green, blue, EyeSize, SpeedDelay, ReturnDelay);<br />LeftToRight(auswahl, red, green, blue, EyeSize, SpeedDelay, ReturnDelay);<br />RightToLeft(auswahl, red, green, blue, EyeSize, SpeedDelay, ReturnDelay);<br />OutsideToCenter(auswahl, red, green, blue, EyeSize, SpeedDelay, ReturnDelay);<br />CenterToOutside(auswahl, red, green, blue, EyeSize, SpeedDelay, ReturnDelay);<br />}</p>
<p>// used by NewKITT<br />void CenterToOutside(int auswahl, byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) {<br />for(int i =((90-EyeSize)/2); i&gt;=0; i--) {<br />setAllRing(0,0,0);<br /><br />setPixel(i, red/10, green/10, blue/10);<br />for(int j = 1; j &lt;= EyeSize; j++) {<br />setPixel(i+j, red, green, blue);<br />}<br />setPixel(i+EyeSize+1, red/10, green/10, blue/10);<br /><br />setPixel(90-i-1, red/10, green/10, blue/10);//bugfix aus text <br />for(int j = 1; j &lt;= EyeSize; j++) {<br />setPixel(90-i-j, red, green, blue);<br />}<br />setPixel(90-i-EyeSize-1, red/10, green/10, blue/10);<br /><br />showStrip();<br />if (readstatus()!=auswahl) return;<br />blinkantrieb();<br />delay(SpeedDelay);<br />}<br />if (readstatus()!=auswahl) return;<br />blinkantrieb();<br />delay(ReturnDelay);<br />}</p>
<p>// used by NewKITT<br />void OutsideToCenter(int auswahl, byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) {<br />for(int i = 0; i&lt;=((90-EyeSize)/2); i++) {<br />setAllRing(0,0,0);<br /><br />setPixel(i, red/10, green/10, blue/10);<br />for(int j = 1; j &lt;= EyeSize; j++) {<br />setPixel(i+j, red, green, blue);<br />}<br />setPixel(i+EyeSize+1, red/10, green/10, blue/10);<br /><br />setPixel(90-i-1, red/10, green/10, blue/10);//bugfix aus text<br />for(int j = 1; j &lt;= EyeSize; j++) {<br />setPixel(90-i-j, red, green, blue);<br />}<br />setPixel(90-i-EyeSize-1, red/10, green/10, blue/10);<br /><br />showStrip();<br />if (readstatus()!=auswahl) return;<br />blinkantrieb();<br />delay(SpeedDelay);<br />}<br />if (readstatus()!=auswahl) return;<br />blinkantrieb();<br />delay(ReturnDelay);<br />}</p>
<p>// used by NewKITT<br />void LeftToRight(int auswahl, byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) {<br />for(int i = 0; i &lt; 90-EyeSize-2; i++) {<br />setAllRing(0,0,0);<br />setPixel(i, red/10, green/10, blue/10);<br />for(int j = 1; j &lt;= EyeSize; j++) {<br />setPixel(i+j, red, green, blue);<br />}<br />setPixel(i+EyeSize+1, red/10, green/10, blue/10);<br />showStrip();<br />if (readstatus()!=auswahl) return;<br />blinkantrieb();<br />delay(SpeedDelay);<br />}<br />if (readstatus()!=auswahl) return;<br />blinkantrieb();<br />delay(ReturnDelay);<br />}</p>
<p>// used by NewKITT<br />void RightToLeft(int auswahl, byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) {<br />for(int i = 90-EyeSize-2; i &gt; 0; i--) {<br />setAllRing(0,0,0);<br />setPixel(i, red/10, green/10, blue/10);<br />for(int j = 1; j &lt;= EyeSize; j++) {<br />setPixel(i+j, red, green, blue);<br />}<br />setPixel(i+EyeSize+1, red/10, green/10, blue/10);<br />showStrip();<br />if (readstatus()!=auswahl) return;<br />blinkantrieb();<br />delay(SpeedDelay);<br />}<br />if (readstatus()!=auswahl) return;<br />blinkantrieb();<br />delay(ReturnDelay);<br />}</p>
<p>// used by NewKITT<br />void blinkantrieb ()<br />{<br />int adder;<br />adder=random (9);<br />setPixel(92+adder,random8(), random8(), random8());<br />}</p>
<p>void schlaflicht(int auswahl)<br />{<br />unsigned int zaehler=0;<br />int i,j;<br /><br />FastLED.setBrightness (0);<br />setAllRing (128,128,128);<br />setCockpit (128,0,0);<br />setAntrieb(0,0,128);<br />setRing (0,0,128,0);<br />setRing (5,128,0,128);<br /><br />brightness=50;<br />dimin(2);<br /><br />lastMillis = millis();<br />Serial.println("start schlafen");<br />zaehler=12000; //wird alle 10 ms runtergezaehlt<br />while (millis() - lastMillis &lt;= 14400000)<br />//while (millis() - lastMillis &lt;= 10000)<br />{<br />zaehler--;<br />if (zaehler==0)<br />{<br />zaehler=12000;<br />if (brightness&gt;100) brightness--;<br />if (brightness&gt;10) brightness--;<br />FastLED.setBrightness (brightness);<br />Serial.print("Hell: ");<br />Serial.println(brightness, DEC);<br />}<br />FastLED.show();<br />if (readstatus()!=auswahl) <br />{<br />dimout(3);<br />brightness=100; //die anderen funktionen kommen mit krummen werten nicht zurecht<br />return;<br />}<br />delay (10); <br />}<br />Serial.println("time to sleep");<br />for (i=1;i&lt;5;i++) //die weissen ringe werden runtergefahren<br />{<br />for (j=128;j&gt;=0;j--)<br />{<br />setRing(i,j,j,j);<br />delay(5);<br />}<br />delay(1000);<br />}<br />for (j=128;j&gt;=0;j--) setAntrieb(0,0,j);<br />while(1)<br />{<br />if (readstatus()!=auswahl) <br />{<br />dimout(3);<br />brightness=100; //die anderen funktionen kommen mit krummen werten nicht zurecht<br />return;<br />}<br />FastLED.show();<br />delay (10);<br />}<br />}</p>
<p>void normaleslicht (int auswahl)<br />{<br />setAll (255,255,255);<br />setPixel(92,0,0,255);<br />setPixel(100,0,0,255);<br />setRing (0,0,0,255);<br />setRing (5,0,0,255);<br />dimin(2);</p>
<p>while (1)<br />{<br />FastLED.show();<br />if (readstatus()!=auswahl) return;<br />delay (10); <br />}<br />}</p>
<p>void allblue (int auswahl)<br />{<br />//Serial.println("start allblue");<br />//delay (3000);<br />setAll (0,0,255);<br />//Serial.println("start dimin");<br />//delay (3000);<br />dimin(2);</p>
<p>while (1)<br />{<br />FastLED.show();<br />if (readstatus()!=auswahl) return;<br />delay (10); <br />}<br />}</p>
<p>void SnowSparkle(int auswahl,byte red, byte green, byte blue, int SparkleDelay, int SpeedDelay) {<br />int i;<br />setAll(0,0,0); <br />dimin(1);<br />while (1)<br />{<br />setAll(0,0,0);<br />for (i=3;i&lt; (random (100));i++)<br />{<br />int Pixel = random(NUM_LEDS)-1;<br />setPixel(Pixel,0xff,0xff,0xff);<br />if (readstatus()!=auswahl) return;<br />delay(SparkleDelay);<br />}<br />FastLED.show();<br />//delay(1);<br />}<br />}</p>
<p>void RunningLights(int auswahl, int WaveDelay) {<br />int Position=0;<br />unsigned char red,green,blue;</p>
<p><br />setAll (0,0,0);<br />dimin(1);<br />while (1)<br />{<br />for(int i=0; i&lt;36; i++)<br />{<br />red=random(255);<br />green=random(255);<br />blue=random(255);<br />Position++; // = 0; //Position + Rate;<br />for(int i=0; i&lt;NUM_LEDS; i++) {<br />// sine wave, 3 offset waves make a rainbow!<br />//float level = sin(i+Position) * 127 + 128;<br />//setPixel(i,level,0,0);<br />float level = sin(i+Position) * 127 + 128;<br />setPixel(i,((sin(i+Position) * 127 + 128)/255)*red,<br />((sin(i+Position) * 127 + 128)/255)*green,<br />((sin(i+Position) * 127 + 128)/255)*blue);<br />}<br /><br />showStrip();<br />if (readstatus()!=auswahl) return;<br />delay(WaveDelay);<br />}<br />}<br />}</p>
<p>//used by fire<br />void setPixelHeatColor (int Pixel, byte temperature) {<br />// Scale 'heat' down from 0-255 to 0-191<br />byte t192 = round((temperature/255.0)*191);<br /><br />// calculate ramp up from<br />byte heatramp = t192 &amp; 0x3F; // 0..63<br />heatramp &lt;&lt;= 2; // scale up to 0..252<br /><br />// figure out which third of the spectrum we're in:<br />if( t192 &gt; 0x80) { // hottest<br />setPixel(Pixel, 255, 255, heatramp);<br />} else if( t192 &gt; 0x40 ) { // middle<br />setPixel(Pixel, 255, heatramp, 0);<br />} else { // coolest<br />setPixel(Pixel, heatramp, 0, 0);<br />}<br />}</p>
<p>void Fire(int auswahl, int Cooling, int Sparking, int SpeedDelay) {<br />static byte heat;<br />int cooldown;<br />setAllRing(0,0,0);<br />setAntrieb(255,0,0);<br />setPixel(90,255,0,0);<br />setPixel(91,255,0,0);<br />dimin(1);<br />while (1)<br />{</p>
<p>// Step 1. Cool down every cell a little<br />for( int i = 0; i &lt; 90; i++) <br />{<br />cooldown = random(0, ((Cooling * 10) / 90) + 2);<br />if(cooldown&gt;heat) heat=0;<br />else heat=heat-cooldown;<br />}<br /><br />// Step 2. Heat from each cell drifts 'up' and diffuses a little<br />for( int k= 90 - 1; k &gt;= 2; k--) heat = (heat + heat + heat) / 3;<br /><br />// Step 3. Randomly ignite new 'sparks' near the bottom<br />if( random(255) &lt; Sparking ) <br />{<br />int y = random(7);<br />heat = heat + random(160,255);<br />}</p>
<p>// Step 4. Convert heat to LED colors<br />for( int j = 0; j &lt; 90; j++) setPixelHeatColor(j, heat );</p>
<p>FastLED.show();<br />if (readstatus()!=auswahl) return;<br />}<br />}</p>
<p>void meteorRain(int auswahl, byte red, byte green, byte blue, byte meteorSize, byte meteorTrailDecay, boolean meteorRandomDecay, int SpeedDelay) { <br />antriebblinkzaehler=0;<br />antriebblinkteiler=0;<br />setAll(0,0,0);<br />dimin(2);<br />while (1)<br />{<br />for(int i = 0; i &lt; 180; i++) {<br /><br /><br />// fade brightness all LEDs one step<br />for(int j=0; j&lt;90; j++) {<br />if( (!meteorRandomDecay) || (random(10)&gt;5) ) {<br />fadeToBlack(j, meteorTrailDecay ); <br />}<br />}<br /><br />// draw meteor<br />for(int j = 0; j &lt; meteorSize; j++) {<br />if( ( i-j &lt;90) &amp;&amp; (i-j&gt;=0) ) {<br />setPixel(i-j, red, green, blue);<br />leds = CHSV(random8(),random8(),random8()); // hue, saturation, value<br />leds = CHSV(random8(),random8(),random8()); // hue, saturation, value<br />antriebblink();<br />}<br />}<br /><br />showStrip();<br />if (readstatus()!=auswahl) return;<br />delay(SpeedDelay);<br />}<br />}<br />}</p>
<p><br />//used by meteorrain<br />void antriebblink ()<br />{<br />int i=0;<br />if (antriebblinkteiler%4==0)<br />{<br />for (i=92;i&lt;101;i++) setPixel(i, 0, 0, antriebblinkzaehler);<br />antriebblinkzaehler++;<br />}<br /><br />antriebblinkteiler++;<br />}<br />// used by meteorrain<br />void fadeToBlack(int ledNo, byte fadeValue) {</p>
<p>leds.fadeToBlackBy( fadeValue );<br />leds = CHSV(random8(),random8(),random8()); // cockpit blinken<br />leds = CHSV(random8(),random8(),random8()); // cockpit blinken<br />antriebblink();<br /><br />}</p>
<p>void theaterChaseRainbow(int auswahl, int SpeedDelay) {<br />byte *c;<br />setAll(0,0,0);<br />dimin(1);<br />while (1)<br />{<br /><br />for (int j=0; j &lt; 256; j++) { // cycle all 256 colors in the wheel<br />for (int q=0; q &lt; 3; q++) {<br />for (int i=0; i &lt; NUM_LEDS; i=i+3) {<br />c = Wheel( (i+j) % 255);<br />setPixel(i+q, *c, *(c+1), *(c+2)); //turn every third pixel on<br />}<br />showStrip();<br /><br />delay(SpeedDelay);<br />if (readstatus()!=auswahl) return;<br /><br />for (int i=0; i &lt; NUM_LEDS; i=i+3) {<br />setPixel(i+q, 0,0,0); //turn every third pixel off<br />}<br />}<br />}<br />}<br />}<br />// used by rainbowCycle and theaterChaseRainbow<br />byte * Wheel(byte WheelPos) {<br />static byte c;<br /><br />if(WheelPos &lt; 85) {<br />c=WheelPos * 3;<br />c=255 - WheelPos * 3;<br />c=0;<br />} else if(WheelPos &lt; 170) {<br />WheelPos -= 85;<br />c=255 - WheelPos * 3;<br />c=0;<br />c=WheelPos * 3;<br />} else {<br />WheelPos -= 170;<br />c=0;<br />c=WheelPos * 3;<br />c=255 - WheelPos * 3;<br />}</p>
<p>return c;<br />}</p>
<p>void rainbowCycle(int auswahl, int SpeedDelay) {<br />byte *c;<br />uint16_t i, j;<br />setAll (0,0,0);<br />dimin(1);<br />while (1)<br />{<br />for(j=0; j&lt;256*5; j++) // 5 cycles of all colors on wheel<br />{</p>
<p>for(i=1; i&lt;= 92; i++) <br />{<br />c=Wheel(((i * 256 / 92) + j) &amp; 255);<br />setPixel(i, *c, *(c+1), *(c+2));<br />}<br />setAntrieb (leds.red,leds.green,leds.blue);<br />FastLED.show();<br />if (readstatus()!=auswahl) return;<br />}<br />}<br />}</p>
<p>void BouncingColoredBalls(int auswahl, int BallCount, byte colors[], boolean continuous) {<br />float Gravity = -9.81;<br />int StartHeight = 1;<br /><br />float Height;<br />float ImpactVelocityStart = sqrt( -2 * Gravity * StartHeight );<br />float ImpactVelocity;<br />float TimeSinceLastBounce;<br />int Position;<br />long ClockTimeSinceLastBounce;<br />float Dampening;<br />boolean ballBouncing;<br />boolean ballsStillBouncing = true;</p>
<p>setAll(0,0,0);<br />setAntrieb(0,255,0);<br />setPixel(90, 0,255,255);<br />setPixel(91,255,255,0);<br />dimin(1);<br />for (int i = 0 ; i &lt; BallCount ; i++) { <br />ClockTimeSinceLastBounce = millis();<br />Height = StartHeight;<br />Position = 0;<br />ImpactVelocity = ImpactVelocityStart;<br />TimeSinceLastBounce = 0;<br />Dampening = 0.90 - float(i)/pow(BallCount,2);<br />ballBouncing=true;<br />}</p>
<p>while (ballsStillBouncing) {<br />for (int i = 0 ; i &lt; BallCount ; i++) {<br />TimeSinceLastBounce = millis() - ClockTimeSinceLastBounce;<br />Height = 0.5 * Gravity * pow( TimeSinceLastBounce/1000 , 2.0 ) + ImpactVelocity * TimeSinceLastBounce/1000;<br /><br />if ( Height &lt; 0 ) { <br />Height = 0;<br />ImpactVelocity = Dampening * ImpactVelocity;<br />ClockTimeSinceLastBounce = millis();<br /><br />if ( ImpactVelocity &lt; 0.01 ) {<br />if (continuous) {<br />ImpactVelocity = ImpactVelocityStart;<br />} else {<br />ballBouncing=false;<br />}<br />}<br />}<br />Position = round( Height * (90 - 1) / StartHeight);<br />}</p>
<p>ballsStillBouncing = false; // assume no balls bouncing<br />for (int i = 0 ; i &lt; BallCount ; i++) {<br />setPixel(Position,colors,colors,colors);<br />if ( ballBouncing ) {<br />ballsStillBouncing = true;<br />}<br />}<br /><br />showStrip();<br />if (readstatus()!=auswahl) return;<br />setAllRing(0,0,0);<br />}<br />}</p>
<p>void NOTUSED_RGBLoop(int auswahl){<br />setAll(0,0,0);<br />dimin(1);<br />for(int j = 0; j &lt; 3; j++ ) {<br />// Fade IN<br />for(int k = 0; k &lt; 256; k++) {<br />switch(j) {<br />case 0: setAll(k,0,0); break;<br />case 1: setAll(0,k,0); break;<br />case 2: setAll(0,0,k); break;<br />}<br />showStrip();<br />delay(3);<br />}<br />// Fade OUT<br />for(int k = 255; k &gt;= 0; k--) {<br />switch(j) {<br />case 0: setAll(k,0,0); break;<br />case 1: setAll(0,k,0); break;<br />case 2: setAll(0,0,k); break;<br />}<br />showStrip();<br />if (readstatus()!=auswahl) return;<br />delay(3);<br />}<br />}<br />}</p>
<p>void TwinkleRandom(int auswahl, int Count, int SpeedDelay, boolean OnlyOne) {<br />setAll(0,0,0);<br />dimin(1);<br />while (1)<br />{<br /><br />for (int i=0; i&lt;Count; i++) {<br />setPixel(random(NUM_LEDS),random(0,255),random(0,255),random(0,255));<br />showStrip();<br />if (readstatus()!=auswahl) return;<br />delay(SpeedDelay);<br />if(OnlyOne) {<br />setAll(0,0,0);<br />}<br />}<br />if (readstatus()!=auswahl) return;<br />delay(SpeedDelay);<br />dimout(5);<br />setAll(0,0,0);<br />dimin(1);<br />}<br />}</p>
<p>void setPixel(int Pixel, byte red, byte green, byte blue) {<br />leds.r = red;<br />leds.g = green;<br />leds.b = blue;<br />}</p>
<p>void showStrip() {</p>
<p>FastLED.show();</p>
<p>}</p>
<p>void setAll(byte red, byte green, byte blue) {<br />for(int i = 0; i &lt; NUM_LEDS; i++ ) {<br />setPixel(i, red, green, blue);<br />}<br />FastLED.show(); <br />}</p>
<p>void setCockpit(byte red, byte green, byte blue) {<br />for(int i = 90; i &lt; 92; i++ ) {<br />setPixel(i, red, green, blue);<br />}<br />FastLED.show(); <br />}</p>
<p>void setAntrieb(byte red, byte green, byte blue) {<br />for(int i = 92; i &lt; 101; i++ ) {<br />setPixel(i, red, green, blue);<br />}<br />FastLED.show(); <br />}</p>
<p><br />void setAllRing (byte red, byte green, byte blue)<br />{<br />int i;<br />for (i=0;i&lt;=5;i++)<br />{<br />setRing(i,red,green,blue);<br />}<br />}</p>
<p>void setRing (byte nummer, byte red, byte green, byte blue)<br />{<br />for(int i = 0; i &lt; 15; i++ ) {<br />setPixel(((nummer)+(i*6)), red, green, blue);<br />}<br />FastLED.show(); <br />}</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>normen</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/lego-millenium-falcon-with-all-ledstrip-effects-in-one-fastled/#post-2465</guid>
                    </item>
							        </channel>
        </rss>
		