home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Language specific support
Deutsches MediaPortal Forum
Hard- und Software rund um den HTPC
Software
3rd Party Software
Atmowin/ Atmolight Plugin - System für SEDU und Arduino basiertes Ambilight
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="goofy84" data-source="post: 1139101" data-attributes="member: 57322"><p>[USER=97876]@Lightning303[/USER] Danke, aber welche der Zeilen muss geändert werden ? Bezüglich des Datenkabels zum LED Strip, denke ich nicht dass es mit 5cm zu lang ist <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />. Problematisch könnte noch das USB Kabel sein, da hier ein Verlängerungskabel 5m -allerdings mit Verstärker- angebracht wurde. Sind die rotmarkierten Stellen mit RGB zu ersetzen ?</p><p></p><p>#include "FastLED.h"</p><p></p><p>// How many leds are in the strip?</p><p>#define NUM_LEDS 114</p><p></p><p>// Data pin that led data will be written out over</p><p>#define DATA_PIN 6</p><p></p><p>// This is an array of leds. One item for each led in your strip.</p><p><span style="color: #ff0000">CRGB leds</span>[NUM_LEDS];</p><p></p><p>void setup(){</p><p> Serial.begin(115200);</p><p> //sanity check delay - allows reprogramming if accidently blowing power w/leds</p><p> delay(3000);</p><p> </p><p> // Change this to match your led strip</p><p> // Uncomment one of the following lines for your leds arrangement.</p><p> // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);</p><p> FastLED.addLeds<WS2812B, DATA_PIN,<span style="color: #ff0000"> GRB</span>>(leds, NUM_LEDS);</p><p> // FastLED.addLeds<NEOPIXEL, DATA_PIN, GRB>(leds, NUM_LEDS);</p><p></p><p> // blank out the LEDs</p><p> setupLEDs();</p><p>}</p><p></p><p>int readByte(){</p><p> while(Serial.available()==0){</p><p> }</p><p> return Serial.read();</p><p>}</p><p></p><p>// show colored LEDs for 500ms then blanks out ready to go</p><p>void setupLEDs(){</p><p> memset(leds,150, sizeof(leds));</p><p> FastLED.show();</p><p> delay(500);</p><p> memset(leds,0, sizeof(leds));</p><p> FastLED.show();</p><p>}</p><p></p><p>void loop(){</p><p> if(readByte() == 0xFF){</p><p> if(readByte() == 0x00){</p><p> if(readByte() == 0x00){</p><p> int channels = readByte();</p><p> for(int channel=0; channel<channels; channel++){</p><p> leds[channel].r = readByte();</p><p> leds[channel].g = readByte();</p><p> leds[channel].b = readByte();</p><p> }</p><p> FastLED.show();</p><p> }</p><p> }</p><p> }</p><p>}</p></blockquote><p></p>
[QUOTE="goofy84, post: 1139101, member: 57322"] [USER=97876]@Lightning303[/USER] Danke, aber welche der Zeilen muss geändert werden ? Bezüglich des Datenkabels zum LED Strip, denke ich nicht dass es mit 5cm zu lang ist :). Problematisch könnte noch das USB Kabel sein, da hier ein Verlängerungskabel 5m -allerdings mit Verstärker- angebracht wurde. Sind die rotmarkierten Stellen mit RGB zu ersetzen ? #include "FastLED.h" // How many leds are in the strip? #define NUM_LEDS 114 // Data pin that led data will be written out over #define DATA_PIN 6 // This is an array of leds. One item for each led in your strip. [COLOR=#ff0000]CRGB leds[/COLOR][NUM_LEDS]; void setup(){ Serial.begin(115200); //sanity check delay - allows reprogramming if accidently blowing power w/leds delay(3000); // Change this to match your led strip // Uncomment one of the following lines for your leds arrangement. // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS); FastLED.addLeds<WS2812B, DATA_PIN,[COLOR=#ff0000] GRB[/COLOR]>(leds, NUM_LEDS); // FastLED.addLeds<NEOPIXEL, DATA_PIN, GRB>(leds, NUM_LEDS); // blank out the LEDs setupLEDs(); } int readByte(){ while(Serial.available()==0){ } return Serial.read(); } // show colored LEDs for 500ms then blanks out ready to go void setupLEDs(){ memset(leds,150, sizeof(leds)); FastLED.show(); delay(500); memset(leds,0, sizeof(leds)); FastLED.show(); } void loop(){ if(readByte() == 0xFF){ if(readByte() == 0x00){ if(readByte() == 0x00){ int channels = readByte(); for(int channel=0; channel<channels; channel++){ leds[channel].r = readByte(); leds[channel].g = readByte(); leds[channel].b = readByte(); } FastLED.show(); } } } } [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Language specific support
Deutsches MediaPortal Forum
Hard- und Software rund um den HTPC
Software
3rd Party Software
Atmowin/ Atmolight Plugin - System für SEDU und Arduino basiertes Ambilight
Contact us
RSS
Top
Bottom