🍪 Privacy & Transparency

We and our partners use cookies to Store and/or access information on a device. We and our partners use data for Personalised ads and content, ad and content measurement, audience insights and product development. An example of data being processed may be a unique identifier stored in a cookie. Some of our partners may process your data as a part of their legitimate business interest without asking for consent. To view the purposes they believe they have legitimate interest for, or to object to this data processing use the vendor list link below. The consent submitted will only be used for data processing originating from this website. If you would like to change your settings or withdraw consent at any time, the link to do so is in our privacy policy accessible from our home page..

Vendor List | Privacy Policy
Skip to content

Technik Blog

Programmieren | Arduino | ESP32 | MicroPython | Python | Raspberry PI

Menu
  • Projekte
    • LED’s
    • Servo & Schrittmotoren
    • Sound
    • LCD’s
    • Kommunikation
    • Sicherheit
    • Weekend Project
  • Arduino
    • Tutorials
    • ProMini
      • Anschließen & Programmieren
    • Nano
      • Arduino Nano – Übersicht
    • UNO
      • Übersicht
    • MEGA 2560
      • Übersicht
    • Leonardo
      • Übersicht
    • NodeMCU
      • NodeMCU – “Einer für (fast) Alles!”
    • Lilypad
      • Arduino: Lilypad “Jetzt Geht’s Rund!”
    • WEMOS
      • WEMOS D1 – Arduino UNO kompatibles Board mit ESP8266 Chip
      • WEMOS D1 Mini – Übersicht
      • Wemos D1 mini Shields
    • STM32x
      • STM32F103C8T6 – Übersicht
    • Maker UNO
      • Maker UNO – Überblick und Test
    • ATTiny85
      • Mini Arduino mit ATTiny85 Chip
      • ATtiny85 mit dem Arduino UNO beschreiben
  • Android
  • Über mich
  • DeutschDeutsch
  • EnglishEnglish
Menu

Bauteile: 5mm RGB LED WS2812B / PL9823-F5

Posted on 29. November 20181. Mai 2023 by Stefan Draeger

Die RGB LED WS2812B gibt es in diversen Ausführungen, diese wären:

  • RGB Stripe,
  • Modul, sowie als
  • 5 mm, rund LED

Das RGB Stripe und Modul habe ich bereits in den Tutorials Arduino Lektion 66: WS2812B RGB LED Stripe sowie Arduino Lektion 11: RGB SMD LED Modul erklärt.

  • Bezug
  • Pinout der 5 mm RGB LED
  • Quellcode
  • Video

Bezug

Diese RGB LED gibt es bei amazon.de unter der Bezeichnung PL9823-F5  für ca. 7 € kaufen (10 Stck.) auf ebay.de findet man diese LED für 8,88 € inkl. Versandkosten für 50 Stck.

Pinout der 5 mm RGB LED

Das RGB Stripe und RGB Modul hat jeweils eine Pinbeschriftung dieses fehlt (natürlich) an der 5 mm RGB LED.
Nachfolgend möchte ich nun dieses aufzeigen.

Pinout einer 5mm, WS18B20 RGB LED
Pinout einer 5 mm, WS18B20 RGB LED

Quellcode

Hier möchte ich nun ein kleines Beispiel zeigen wie diese LED angesteuert werden kann. Über den DOUT kann wiederum eine RGB LED angeschlossen werden usw.

#include <Adafruit_NeoPixel.h>

#define PIN            3 //digitaler PWM Pin 3 am Arduino Nano
#define NUMPIXELS      1 //Anzahl der angeschlossenen RGB LEDs
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

//definieren einer Liste von Farben welche 
//mit der LED angezeigt werden sollen
int colors[7][3] = {{255,0,255},
                    {0, 153, 255},
                    {51, 204, 51},
                    {255, 51, 0},
                    {102, 0, 204},
                    {255, 255, 0},
                    {102, 255, 204}
                    };

void setup() {
  pixels.begin(); // initialisieren der NeoPixel Bibliothek
}

void loop() {
  //Schleife über die Liste der Farben
  for(int i=0;i<7;i++){
     lightUp(colors[i][0], colors[i][1],colors[i][2]);
  }  
}

//Diese Funktion sendet einen RGB Farbwert an die RGB LED
void lightUp(int red, int green, int blue){
  pixels.setPixelColor(0, pixels.Color(red,green,blue));
  pixels.show(); // Wichtig !! für die Anzeige der neuen Farbe muss diese Funktion aufgerufen werden.
  delay(750); // eine kleine Pause
}

Video

1 thought on “Bauteile: 5mm RGB LED WS2812B / PL9823-F5”

  1. Pingback: Bauteile: Leuchtdiode (LED) - Technik Blog

Schreibe einen Kommentar Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Kategorien

Tools

  • 8×8 LED Matrix Tool
  • 8×16 LED Matrix Modul von Keyestudio
  • 16×16 LED Matrix – Generator
  • Widerstandsrechner
  • Rechner für Strom & Widerstände
  • ASCII Tabelle

Meta

  • Videothek
  • Impressum
  • Datenschutzerklärung
  • Disclaimer
  • Kontakt
  • Cookie-Richtlinie (EU)

Links

Blogverzeichnis Bloggerei.de Blogverzeichnis TopBlogs.de das Original - Blogverzeichnis | Blog Top Liste Blogverzeichnis trusted-blogs.com
©2023 Technik Blog | Built using WordPress and Responsive Blogily theme by Superb