Neopixel im SmartHome

Hello everybody,

In keeping with our project on Amazon, we would like to present a solution today that can be used to control Neopixel without great programming effort and to integrate it into existing systems. We are up to our research McLighting encountered.

We use ours in today's example D1mini with a Button module.

Before we start our project, I would like to point out that WS2812 alias Neopixel not only operate with 5V, but also communicate with 5V logic, so you actually need a logic level converter when using a 3.3V controller.

Toblumnot only provides the software, but also provides the files of a small board that was designed according to Adafruits specifications.
There is space for the ESP, a logic level converter, an ElKo and the recommended resistors.

If you have never worked with NeoPixel before, it is highly recommended that provided by Adafruit NeoPixel overguide  to read so as not to damage your pixels and to operate them optimally.

For problem-free operation you need a level converter, a 1000µF electrolytic capacitor and a 300Ohm resistor in addition to the D1. The ElKo for the power supply and the resistance on the data line.

We have soldered a breadboard on the fast for permanent operation:

However, since we only want to test the software today, we forego the necessary circuitry. We connect the LEDs directly to the D1 mini, so the wiring:

D1 mini WS2812 5V power supply
D1 Data


So you can connect the pins of the D1 with jumper cables directly to the connector of the pixels.

Incidentally, the project can be implemented much more conveniently with PlatformIO, since the Libarys are installed automatically.

Detailed instructions can be found on the GitHub pagehere.

We have checked the instructions for the ArduinoIDE step by step for you and were able to adopt them 1: 1, the necessary work steps briefly summarized with the necessary links:

Install Libarys (for full functionality)

  • WiFi manager
  • WebSockets
  • Adafruit NeoPixel
  • ArduinoJson
  • ESPAsyncTCP
  • MQTT
  • WS2812FX
  • NeoPixelBus
  • NeoAnimationFX

  • Download the code and move it to the Arduino project directory, e.g. "C: \ Users \ Markus Neumann \ Documents \ Arduino". Then open "McLighting.ino". Additional tabs should open when you have copied the complete data from the download into the project folder.
  • Adjust the "definitions.h" in your project folder to your setup: the number of pixels and the pin used are important, the rest works in the standard configuration, as you can see in the file there is even a button on pin 4 to switch the effects .

  • Compile code and upload to controller

  • The D1 then opens a HotSpot with which you can connect to any device. The configuration page should be called up automatically. If this is not the case, you can reach the controller at

  • Click on WiFi (No Scan) and enter the access data in the appropriate lines. You can also enter your MQTT broker here. After a final restart, the D1 should connect to your network and obtain an address via DHCP. You can find them in your router.

  • Now install the web interface: Open the URL http: // IP_ADRESSE_DES_D1 / upload in your browser.
    If you have loaded the entire download into your Arduino project directory, you will find the necessary file under "C: \ Users \ MarkusNeumann \ Documents \ Arduino \ McLighting \ clients \ web "
    Select the file "index.htm" and click on "Upload".

  • After a reset, the user interface is available via the controller's IP address.

If you have problems with the implementation of this project, please feel free to leave a comment, we will then publish a more detailed description if you are interested. Since the pixels in the source code have to be adjusted, we are unfortunately unable to provide an image.

Until the next post :)

Esp-8266Projects for beginnersSmart home

1 comment



Leider sind bei mir Blau und grün vertauscht.
Laut McLighting-wiki soll die Zeile
WS2812FX-Streifen = WS2812FX (NUMLEDS, PIN, NEO_BRG + NEO_KHZ800);
angepasst werden.
Im McLighting.ino ist die Zeile aber auskommentiert.
Was kann nun probieren?

Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. Install ESP32 now from the board manager
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA - Over the Air - ESP programming via WLAN