forked from Aircoookie/WLED
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into codegen-html
- Loading branch information
Showing
44 changed files
with
2,719 additions
and
1,313 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,8 @@ arduino_core_develop = https://github.com/platformio/platform-espressif8266#deve | |
arduino_core_git = https://github.com/platformio/platform-espressif8266#feature/stage | ||
|
||
# Platform to use for ESP8266 | ||
platform_wled_default = ${common.arduino_core_2_7_1} | ||
# We use 2.7.0+ on analog boards because of PWM flicker fix | ||
platform_latest = ${common.arduino_core_2_7_1} | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
@@ -165,6 +167,8 @@ lib_deps = | |
[email protected] | ||
Esp Async [email protected] | ||
[email protected] | ||
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line | ||
#TFT_eSPI | ||
#For use SSD1306 OLED display uncomment following | ||
#U8g2@~2.27.2 | ||
#For Dallas sensor uncomment following 2 lines | ||
|
@@ -180,51 +184,51 @@ lib_ignore = | |
|
||
[env:nodemcuv2] | ||
board = nodemcuv2 | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_4m1m} | ||
build_flags = ${common.build_flags_esp8266} | ||
|
||
[env:esp01] | ||
board = esp01 | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_512k} | ||
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA -D WLED_DISABLE_ALEXA -D WLED_DISABLE_BLYNK | ||
-D WLED_DISABLE_CRONIXIE -D WLED_DISABLE_HUESYNC -D WLED_DISABLE_INFRARED | ||
-D WLED_DISABLE_CRONIXIE -D WLED_DISABLE_HUESYNC -D WLED_DISABLE_INFRARED -D WLED_DISABLE_MQTT | ||
|
||
[env:esp01_1m_ota] | ||
board = esp01_1m | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_1m0m} | ||
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_ALEXA -D WLED_DISABLE_BLYNK -D WLED_DISABLE_CRONIXIE -D WLED_DISABLE_HUESYNC -D WLED_DISABLE_INFRARED | ||
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_ALEXA -D WLED_DISABLE_BLYNK -D WLED_DISABLE_CRONIXIE -D WLED_DISABLE_HUESYNC -D WLED_DISABLE_INFRARED -D WLED_DISABLE_MQTT | ||
|
||
[env:esp01_1m_full] | ||
board = esp01_1m | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_1m0m} | ||
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA | ||
|
||
[env:esp07] | ||
board = esp07 | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_4m1m} | ||
build_flags = ${common.build_flags_esp8266} | ||
|
||
[env:d1_mini] | ||
board = d1_mini | ||
platform = ${common.platform_latest} | ||
upload_speed = 921500 | ||
platform = ${common.platform_wled_default} | ||
upload_speed = 921600 | ||
board_build.ldscript = ${common.ldscript_4m1m} | ||
build_flags = ${common.build_flags_esp8266} | ||
|
||
[env:heltec_wifi_kit_8] | ||
board = d1_mini | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_4m1m} | ||
build_flags = ${common.build_flags_esp8266} | ||
|
||
[env:h803wf] | ||
board = d1_mini | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_4m1m} | ||
build_flags = ${common.build_flags_esp8266} -D LEDPIN=1 -D WLED_DISABLE_INFRARED | ||
|
||
|
@@ -267,7 +271,7 @@ build_flags = ${common.build_flags_esp8266} -D WLED_USE_ANALOG_LEDS -D WLED_USE_ | |
[env:d1_mini_debug] | ||
board = d1_mini | ||
build_type = debug | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_4m1m} | ||
build_flags = ${common.build_flags_esp8266} ${common.debug_flags} | ||
|
||
|
@@ -276,7 +280,7 @@ board = d1_mini | |
upload_protocol = espota | ||
# exchange for your WLED IP | ||
upload_port = "10.10.1.27" | ||
platform = ${common.platform_latest} | ||
platform = ${common.platform_wled_default} | ||
board_build.ldscript = ${common.ldscript_4m1m} | ||
build_flags = ${common.build_flags_esp8266} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
![WLED logo](https://raw.githubusercontent.com/Aircoookie/WLED/master/wled_logo.png) | ||
|
||
[![](https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square)](https://github.com/Aircoookie/WLED/releases) | ||
[![](https://img.shields.io/discourse/topics?colorB=blue&label=forum&server=https%3A%2F%2Fwled.discourse.group%2F&style=flat-square)](https://wled.discourse.group) | ||
[![](https://img.shields.io/discord/473448917040758787.svg?colorB=blue&label=discord&style=flat-square)](https://discord.gg/KuqP7NE) | ||
[![](https://img.shields.io/badge/quick_start-wiki-blue.svg?style=flat-square)](https://github.com/Aircoookie/WLED/wiki) | ||
[![](https://img.shields.io/badge/app-wled-blue.svg?style=flat-square)](https://github.com/Aircoookie/WLED-App) | ||
|
||
## Welcome to my project WLED! | ||
|
||
A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B, WS2811, SK6812, APA102) LEDs! | ||
|
||
### Features: | ||
<p align="center"> | ||
<img src="/images/wled_logo.png"> | ||
<a href="https://github.com/Aircoookie/WLED/releases"><img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a> | ||
<a href="https://wled.discourse.group"><img src="https://img.shields.io/discourse/topics?colorB=blue&label=forum&server=https%3A%2F%2Fwled.discourse.group%2F&style=flat-square"></a> | ||
<a href="https://discord.gg/KuqP7NE"><img src="https://img.shields.io/discord/473448917040758787.svg?colorB=blue&label=discord&style=flat-square"></a> | ||
<a href="https://github.com/Aircoookie/WLED/wiki"><img src="https://img.shields.io/badge/quick_start-wiki-blue.svg?style=flat-square"></a> | ||
<a href="https://github.com/Aircoookie/WLED-App"><img src="https://img.shields.io/badge/app-wled-blue.svg?style=flat-square"></a> | ||
</p> | ||
|
||
# 👋 Welcome to my project WLED! | ||
|
||
A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B, WS2811, SK6812, APA102) LEDs or also SPI based chipsets like the WS2801! | ||
|
||
## ⚙️ Features | ||
- WS2812FX library integrated for over 100 special effects | ||
- FastLED noise effects and 50 palettes | ||
- Modern UI with color, effect and segment controls | ||
|
@@ -25,7 +26,7 @@ A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control | |
- Configurable analog clock + support for the Cronixie kit by Diamex | ||
- Configurable Auto Brightness limit for safer operation | ||
|
||
### Supported light control interfaces: | ||
## 💡 Supported light control interfaces | ||
- WLED app for Android and iOS | ||
- JSON and HTTP request APIs | ||
- MQTT | ||
|
@@ -40,7 +41,7 @@ A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control | |
- Infrared remotes (24-key RGB, receiver required) | ||
- Simple timers/schedules (time from NTP, timezones/DST supported) | ||
|
||
### Quick start guide and documentation: | ||
## 📲 Quick start guide and documentation | ||
|
||
See the [wiki](https://github.com/Aircoookie/WLED/wiki)! | ||
|
||
|
@@ -54,18 +55,39 @@ Russian speakers, check out the videos by Room31: | |
[WLED Firmware Overview: Interface and Settings](https://youtu.be/h7lKsczEI7E) | ||
[ESP8266 based LED controller for WS2812b strip. WLED Firmware + OpenHAB](https://youtu.be/K4ioTt3XvGc) | ||
|
||
### Other | ||
## 🖼️ Images | ||
<img src="/images/macbook-pro-space-gray-on-the-wooden-table.webp" width="50%"><img src="/images/walking-with-iphone-x.webp" width="50%"> | ||
|
||
## 💾 Compatible LED Strips | ||
Type | Voltage | Comments | ||
|---|---|---| | ||
WS2812B | 5v | | ||
WS2813 | 5v | | ||
SK6812 | 5v | RGBW | ||
APA102 | 5v | C/D | ||
WS2801 | 5v | C/D | ||
LPD8806 | 5v | C/D | ||
TM1814 | 12v | RGBW | ||
WS2811 | 12v | 3-LED segments | ||
WS2815 | 12v | | ||
GS8208 | 12v | | ||
|
||
## ✌️ Other | ||
|
||
Licensed under the MIT license | ||
Credits [here](https://github.com/Aircoookie/WLED/wiki/Contributors-&-About)! | ||
|
||
Uses Linearicons by Perxis! | ||
|
||
Join the Discord [server](https://discord.gg/KuqP7NE) to discuss everything about WLED! | ||
Join the Discord server to discuss everything about WLED! | ||
|
||
[![WLED Discord](https://discordapp.com/api/guilds/473448917040758787/widget.png?style=banner2)](https://discord.gg/KuqP7NE) | ||
|
||
Check out the WLED [Discourse forum](https://wled.discourse.group)! | ||
You can also send me mails to [[email protected]](mailto:[email protected]), but please only do so if you want to talk to me privately. | ||
If WLED really brightens up your every day, you can [![](https://img.shields.io/badge/send%20me%20a%20small%20gift-paypal-blue.svg?style=flat-square)](https://paypal.me/aircoookie) | ||
|
||
|
||
*Disclaimer:* | ||
If you are sensitive to photoeleptic seizures it is not recommended that you use this software. | ||
In case you still want to try, don't use strobe, lighting or noise modes or high effect speed settings. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Usermods API v2 example usermod | ||
|
||
In this usermod file you can find the documentation on how to take advantage of the new version 2 usermods! | ||
|
||
## Installation | ||
|
||
Copy `usermod_v2_example.h` to the wled00 directory. | ||
Uncomment the corresponding lines in `usermods_list.h` and compile! | ||
_(You shouldn't need to actually install this, it does nothing useful)_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
#pragma once | ||
|
||
#include "wled.h" | ||
|
||
/* | ||
* Usermods allow you to add own functionality to WLED more easily | ||
* See: https://github.com/Aircoookie/WLED/wiki/Add-own-functionality | ||
* | ||
* This is an example for a v2 usermod. | ||
* v2 usermods are class inheritance based and can (but don't have to) implement more functions, each of them is shown in this example. | ||
* Multiple v2 usermods can be added to one compilation easily. | ||
* | ||
* Creating a usermod: | ||
* This file serves as an example. If you want to create a usermod, it is recommended to use usermod_v2_empty.h from the usermods folder as a template. | ||
* Please remember to rename the class and file to a descriptive name. | ||
* You may also use multiple .h and .cpp files. | ||
* | ||
* Using a usermod: | ||
* 1. Copy the usermod into the sketch folder (same folder as wled00.ino) | ||
* 2. Register the usermod by adding #include "usermod_filename.h" in the top and registerUsermod(new MyUsermodClass()) in the bottom of usermods_list.cpp | ||
*/ | ||
|
||
//class name. Use something descriptive and leave the ": public Usermod" part :) | ||
class MyExampleUsermod : public Usermod { | ||
private: | ||
//Private class members. You can declare variables and functions only accessible to your usermod here | ||
unsigned long lastTime = 0; | ||
public: | ||
//Functions called by WLED | ||
|
||
/* | ||
* setup() is called once at boot. WiFi is not yet connected at this point. | ||
* You can use it to initialize variables, sensors or similar. | ||
*/ | ||
void setup() { | ||
//Serial.println("Hello from my usermod!"); | ||
} | ||
|
||
|
||
/* | ||
* connected() is called every time the WiFi is (re)connected | ||
* Use it to initialize network interfaces | ||
*/ | ||
void connected() { | ||
//Serial.println("Connected to WiFi!"); | ||
} | ||
|
||
|
||
/* | ||
* loop() is called continuously. Here you can check for events, read sensors, etc. | ||
* | ||
* Tips: | ||
* 1. You can use "if (WLED_CONNECTED)" to check for a successful network connection. | ||
* Additionally, "if (WLED_MQTT_CONNECTED)" is available to check for a connection to an MQTT broker. | ||
* | ||
* 2. Try to avoid using the delay() function. NEVER use delays longer than 10 milliseconds. | ||
* Instead, use a timer check as shown here. | ||
*/ | ||
void loop() { | ||
if (millis() - lastTime > 1000) { | ||
//Serial.println("I'm alive!"); | ||
lastTime = millis(); | ||
} | ||
} | ||
|
||
|
||
/* | ||
* addToJsonInfo() can be used to add custom entries to the /json/info part of the JSON API. | ||
* Creating an "u" object allows you to add custom key/value pairs to the Info section of the WLED web UI. | ||
* Below it is shown how this could be used for e.g. a light sensor | ||
*/ | ||
/* | ||
void addToJsonInfo(JsonObject& root) | ||
{ | ||
int reading = 20; | ||
//this code adds "u":{"Light":[20," lux"]} to the info object | ||
JsonObject user = root["u"]; | ||
if (user.isNull()) user = root.createNestedObject("u"); | ||
JsonArray lightArr = user.createNestedArray("Light"); //name | ||
lightArr.add(reading); //value | ||
lightArr.add(" lux"); //unit | ||
} | ||
*/ | ||
|
||
|
||
/* | ||
* addToJsonState() can be used to add custom entries to the /json/state part of the JSON API (state object). | ||
* Values in the state object may be modified by connected clients | ||
*/ | ||
void addToJsonState(JsonObject& root) | ||
{ | ||
//root["user0"] = userVar0; | ||
} | ||
|
||
|
||
/* | ||
* readFromJsonState() can be used to receive data clients send to the /json/state part of the JSON API (state object). | ||
* Values in the state object may be modified by connected clients | ||
*/ | ||
void readFromJsonState(JsonObject& root) | ||
{ | ||
userVar0 = root["user0"] | userVar0; //if "user0" key exists in JSON, update, else keep old value | ||
//if (root["bri"] == 255) Serial.println(F("Don't burn down your garage!")); | ||
} | ||
|
||
|
||
/* | ||
* getId() allows you to optionally give your V2 usermod an unique ID (please define it in const.h!). | ||
* This could be used in the future for the system to determine whether your usermod is installed. | ||
*/ | ||
uint16_t getId() | ||
{ | ||
return USERMOD_ID_EXAMPLE; | ||
} | ||
|
||
//More methods can be added in the future, this example will then be extended. | ||
//Your usermod will remain compatible as it does not need to implement all methods from the Usermod base class! | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Fix unreachable Webserver | ||
|
||
This modification performs a ping request to the local IP address every 60 seconds. By this procedure the web server remains accessible in some problematic WLAN environments. | ||
|
||
The modification works with static or DHCP IP address configuration | ||
|
||
_Story:_ | ||
|
||
Unfortunately, with all ESP projects where a web server or other network services are running, I have the problem that after some time the web server is no longer accessible. Now I found out that the connection is at least reestablished when a ping request is executed by the device. | ||
|
||
With this modification, in the worst case, the network functions are not available for 60 seconds until the next ping request. | ||
|
||
## Installation | ||
|
||
Copy and replace the file `usermod.cpp` in wled00 directory. | ||
|
||
|
Oops, something went wrong.