Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

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?

 

Geschrieben

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 :D.

Geschrieben
  • Autor

Das habe ich mir schon fast gedacht.

Da muss wohl dann erst die EU kommen bis die Hersteller das durchgängig machen :D

 

 

Geschrieben

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.