This is just my tutorial of controlling an array of leds connected to an ESP8266. It creates and hosts a webpage accesible to all the hosts of the network to update the state of the leds.
This repository is licensed under the Creative Commons Attribution-ShareAlike (CC-BY-SA) license. This means that you are free to use, share, and modify the code and any derivative works, as long as you give credit to the original creator and share any derivative works under the same license.
If you use this code in your own work, please provide a clear attribution to the original creator and a link back to this repository.
If you create derivative works based on this code, you must share them under the same CC-BY-SA license.
If you have any questions about this license or would like to discuss using this code in a different way, please contact me at "[email protected]".
The power source of 12V and 30A chosen is because we need to power up like 1200 leds at the same time. Maybe you don't need to light the same amount of leds, but i'll attach here links of various power sources from my project.
Amazon | 28€/u
Amazon | 29€/u
Amazon | 23€/u
I've decided to use the WS2812B led strip because is a type of digitally addressable LED strip that allows individual control over each LED on the strip. Each LED on the strip has a built-in controller chip that communicates with other LEDs in the strip, enabling the creation of complex patterns and animations. And also because it only requires a single data line to control all of the LEDs on the strip.
AliExpress | 10.17€/m
An aluminum profile is specifically designed to house LED strips, providing a stylish and discreet way to install lights. The aluminum profile for LED needs a cover (which can be transparent or milky diffused), two mounting clips, and two end caps (one with a hole for the cable and one without a hole).
Aliexpress | 12.93€/m
Amazon | 5€/m
Amazon | 4.15€/m
Amazon | 8.12€/m
The NodeMCU ESP8266 is a popular development board that is based on the ESP8266 Wi-Fi module. The ESP8266 module is a low-cost, low-power system-on-a-chip (SoC) that is commonly used in Internet of Things (IoT) applications. The NodeMCU ESP8266 development board features an integrated USB-to-serial converter, which enables the board to be programmed and powered directly from a computer's USB port. The board also includes a built-in Wi-Fi module, which allows it to connect to a wireless network and communicate with other devices.
AliExpress | 2.5€/u
Amazon | 7.5€/u
Amazon | 4.6€/u
Amazon | 10€/u
NodeMCU comes with a Micro USB port to connect to the power, so we'll need to connect it to the computer and upload the code from the IDE. You must ensure that the chosen cord has data-transfering wire.
Aliexpress | 1€/u
Amazon | 6.10€/u
Amazon | 6.33€/u
Amazon | 4.5€/u
The Arduino IDE (Integrated Development Environment) is a software tool used for programming and developing applications for Arduino microcontrollers. It is a simple and user-friendly platform that enables developers to write, compile, and upload code to Arduino boards.
The Arduino IDE includes a text editor, a compiler, and a microcontroller programming environment, making it a one-stop-shop for developers who want to create projects with Arduino. It supports a simplified version of the C++ programming language and provides a range of built-in functions and libraries, making it easy for developers to get started with coding for Arduino.
You can go to the download page directly from this link
For your computer to recognise the ESP8266 board you need to install some drivers for the COM port, you can download them here.
- On Preferences go to Additional Boards Manager URL and paste this link:
https://arduino.esp8266.com/stable/package_esp8266com_index.json
This will add the repository for the NodeMCU board drivers.
- On Tools go to Board: -> Boards manager and search for esp2866 to install.
- Go again to Boards manager and select Node MCU 1.0 from ESP8266 Boards.
The required libraries for the code are:
- ESP8266WiFi
- WiFiClient
- ESP8266WebServer
- FastLED
You can find em in this repository, following this link.
To add downloaded libraries to your library manager, you just have to go to your Arduino folder (mine is located in /home/usr/Arduino) and paste the un-zipped libraries into the folder libraries on the Arduino folder.