Temp Posted January 26, 2014 at 04:38 PM Share Posted January 26, 2014 at 04:38 PM Hallo, ich habe mich Heute mal genauer mit den LED Bricklet beschäftig und mir ist aufgefallen das beim RGB das GB vertauscht wird. Im Beispiel steht das folgender Code die Farbe Grün setzten soll: // Set first 10 LEDs to green byte[] r = new byte[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; byte[] g = new byte[] {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0}; byte[] b = new byte[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0 ,0}; ledStrip.SetRGBValues(0, 10, r, g, b); Bei mir kommt Blau. Auch im BrickV ist das vertauscht. Bin ich nur davon betroffen oder kann das einer reproduzieren? Quote Link to comment Share on other sites More sharing options...
borg Posted January 26, 2014 at 04:54 PM Share Posted January 26, 2014 at 04:54 PM Die LEDs sind leider nicht bei jedem Hersteller gleich angeschlossen. Wir können das aber von außen nicht feststellen, daher kann es da zu einer beliebigen Vertauschung kommen . Also einfach einmal am Anfang durchprobieren was genau R, G und B ist und dann passend nutzen . Quote Link to comment Share on other sites More sharing options...
Temp Posted January 27, 2014 at 01:07 PM Author Share Posted January 27, 2014 at 01:07 PM Das habe ich mir schon fast gedacht. Da muss wohl dann erst die EU kommen bis die Hersteller das durchgängig machen Quote Link to comment Share on other sites More sharing options...
Nemo Posted January 28, 2014 at 09:08 AM Share Posted January 28, 2014 at 09:08 AM Mir ist das auch schon aufgefallen, ich vertausche immer die Farben, nicht: ledStrip.SetRGBValues(0, 10, r, g, b); sondern: ledStrip.SetRGBValues(0, 10, r, b, g); Danach stimmen auch die Beispiele wieder. ;-) Gruß, Nemo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.