Flags/functions specific to WLED MoonModules are denoted with the ☾ icon.
Basic Usage
In "my_config.h" or in the C/C++ code
For entries with no parameter, prefix with #define like #define WLED_DEBUG
For entries with a numeric parameter, use the syntax of #define LEDPIN 16
For non-numeric entries use quotes like #define WLED_AP_SSID "MY-WLED-AP"
In "platformio.ini" or "platformio_override.ini"
For items with no parameter, prefix with -D like -D WLED_DEBUG
For entries with a numeric parameter, use the syntax of -D LEDPIN=16
For non-numeric entries use both types of quotes like -D SERVERNAME='"WLED-C3"'
The Long List of Flags
Common WLED buildflags
Flag
Description
WLED_RELEASE_NAME
Sets the internal release name of the build. Also used to set bin filenames in PlatformIO builds.
WLED_MAX_USERMODS
defaults to 4 on esp8266 and 6 on ESP32
WLED_MAX_BUSSES
defaults to 3 on esp8266, 10 on esp32 without AR, 8 on esp32 with AR, 6 on ESP32S3, 6 esp32S2 with AR, 7 on esp32s2 without AR, 3 on ESP32C3
WLED_MAX_BUTTONS
defaults to 2 on esp8266 and 4 on esp32
WLED_MAX_LEDMAPS
defaults to 10 on esp8266 and 156 on esp32
MAX_LEDS
defaults to 1664 on esp8266 and 8192 on esp32
MAX_LED_MEMORY
defaults to 4000 on esp8266 and 32000 on esp32C3 and esp32S2, 64000 on ESP32 and ESP32S3
MAX_LEDS_PER_BUS
defaults to 2048
WLED_USE_ETHERNET
enables Ethernet support
ABL_MILLIAMPS_DEFAULT
0 to disable minimum is 250, defaults to 850
WLED_PWM_FREQ
defaults to 880 on esp8266 and 19531 on esp32
LEDPIN
defaults to GPIO2 on esp8266 and GPIO16 on esp32
WLED_ENABLE_DMX
Enables hardware DMX input/output functions
DEFAULT_LED_COUNT
defaults to 30
HW_PIN_SCL
defaults to SCL value
HW_PIN_SDA
defaults to SDA value
HW_PIN_CLOCKSPI
defaults to SCK
HW_PIN_DATASPI
defaults to MOSI
HW_PIN_MISOSPI
defaults to MISO
WLED_USE_REAL_MATH
use math and not lookuptables
DEFAULT_LED_TYPE
defaults to TYPE WS2812_RGB
PIXEL_COUNTS
defaults to DEFAULT_LED_COUNT
DATA_PINS
defaults to LEDPIN
DEFAULT_LED_COLOR_ORDER
defaults to COL_ORDER_GRB
WLED_WATCHDOG_TIMEOUT
set the whatchdog timout in milliseconds, default to 0 (deactivated)
WLED_DISABLE_BROWNOUT_DET
disables ESP32 brownout detector (off by default)
CLIENT_SSID
Sets the default WiFi SSID to connect to
CLIENT_PASS
Sets the default WiFi password to connect with
WLED_AP_SSID
Sets the name of the internal WiFI AP
WLED_AP_PASS
Set the default password for the internal WiFi AP
SPIFFS_EDITOR_AIRCOOOKIE
If you are not using the Aircoookie fork of the ESPAsyncWebserver library and using upstream, puts your WiFi password at risk of being served by the filesystem. Comment out this error message to build regardless.
WLED_VERSION
defaults to "dev"
BTNPIN
Sets the first button pin GPIO
RLYPIN
Sets the relay GPIO
RLYMDE
1=active high, 0= active low
IRPIN
Sets the IR receiver GPIO
SERVERNAME
defaults to "WLED"
WLED_DEBUG_HOST
to send debug messages over network to host 192.168.x.y - FQDN is also possible
WLED_DEBUG_PORT
defaults to 7868
WLED_AP_SSID_UNIQUE
Adds the MAC address to the WLED AP SSID if enabled, so everything doen't show up as "WLED-AP"
WLED_DEBUG
Turns on debug messages to the serial console
LED_BUILTIN
Fix for turning off onboard LED breaking bus
WLED_USE_IC_CCT
...something about how LED strips with warm+cool white LEDS work
WLED_MAX_CCT_BLEND
How warm and cool white RGBWW LEDs are managed
WLED_ADD_EEPROM_SUPPORT
Enable saving key settings to EEPROM (actually 512 bytes of Flash memory, not literal EEPROM)
ESP32_DATA_IDLE_HIGH
If enabled, RMT idle level is set to HIGH when off to prevent leakage current when using an N-channel MOSFET to toggle LED power
WLED_ENABLE_SIMPLE_UI
Enables a simplified web UI. Used mostly on small devices like the ES8266
WLED_ENABLE_MQTT
Enables WLED to send internals and usermod data via MQTT
WLED_ENABLE_JSONLIVE
peek LED output via /json/live (WS binary peek is always enabled)
Enables PSRAM during compilation. Board needs to have PSRAM, not all of them do.
WLED_USE_PSRAM
Uses PSRAM for several functions. Often slows down LEDs.
WLED_USE_PSRAM_JSON
☾ Uses PSRAM only for the JSON decoding buffer. Does not slow down LEDs. This setting also increases JSON_BUFFER_SIZE from 24576 to 60000 when enabled on ESP32 and ESP32-S3 (and 48000 on ESP32-S2 and -C3), allowing for bigger LED remapping files.
MoonModules ☾ Specific Flags
Artifx ☾
Flag
Description
ARTI_DEBUG
Enables ArtiFX debug
ARTI_ANDBG
ArtiFX debugging
ARTI_RUNLOG
if set on arduino this will create massive amounts of output (as ran in a loop)
ARTI_PRINT
will show the printf calls
ARTI_ERRORWARNING
shows lexer, parser, analyzer and interpreter errors
ARTI_MEMORY
to do analyses of memory usage, trace memoryleaks (works only on arduino)
OPTIMIZED_TREE
Optimized tree function for ArtiFX
Pinmanager ☾
Flag
Description
SOC_ADC_CHANNEL_NUM
Sets ADC0 or ADC1 for I2C functions
MPU6050_INT_GPIO
Sets the interrupt pin for the MPU6050. Also uses I2C. Does not work when Four Line Display is enabled.
Internals ☾
Flag
Description
WLED_DEBUG_MATH
Prints out results of some more complex math functions to the serial console.
MoonModules Usermods ☾
Flag
Description
USERMOD_MPU6050_IMU
Enables the Motion Processing Unit - MPU6050
ARTIFX
Enables the runtime effects scripting interperter
WEATHER
Enables the weather display usermod
USERMOD_GAMES
Enables effects/games that use the MPU6050 chip
USERMOD_FASTLED
Enables extra effects with a Creative Commons license. Do not enable this if using WLED in a for-profit manner.
Generic WLED Flags
WLED Usermods
Flag
Description
USERMOD_BATTERY
usermod_v2_Battery.h
USERMOD_DALLASTEMPERATURE
usermod_temperature.h
USERMOD_SHT
usermod_sht.h
USERMOD_SN_PHOTORESISTOR
usermod_sn_photoresistor.h
USERMOD_PWM_FAN
usermod_PWM_fan.h
USERMOD_BUZZER
usermod_v2_buzzer.h
USERMOD_SENSORSTOMQTT
usermod_v2_SensorsToMqtt.h
USERMOD_PIRSWITCH
usermod_PIR_sensor_switch.h
USERMOD_MODE_SORT
usermod_v2_mode_sort.h
USERMOD_BH1750
usermod_BH1750.h
USERMOD_BME280
usermod_bme280.h
USERMOD_FOUR_LINE_DISPLAY
usermod_v2_four_line_display.h
USERMOD_ROTARY_ENCODER_UI
usermod_v2_rotary_encoder_ui.h
USE_ALT_DISPlAY
Alt versions of the two above instead of normal. You likely want to use this if you are using the above two features.
USERMOD_AUTO_SAVE
usermod_v2_auto_save.h
USERMOD_DHT
usermod_dht.h
USERMOD_VL53L0X_GESTURES
usermod_vl53l0x_gestures.h
USERMOD_ANIMATED_STAIRCASE
Animated_Staircase.h
USERMOD_MULTI_RELAY
usermod_multi_relay.h
USERMOD_RTC
usermod_rtc.h
USERMOD_ELEKSTUBE_IPS
usermod_elekstube_ips.h
USERMOD_ROTARY_ENCODER_BRIGHTNESS_COLOR
usermod_rotary_brightness_color.h
RGB_ROTARY_ENCODER
rgb-rotary-encoder.h
USERMOD_ST7789_DISPLAY
ST7789_Display.h
USERMOD_SEVEN_SEGMENT
usermod_v2_seven_segment_display.h
USERMOD_SSDR
usermod_seven_segment_reloaded.h
USERMOD_CRONIXIE
usermod_cronixie.h
QUINLED_AN_PENTA
quinled-an-penta.h
USERMOD_WIZLIGHTS
wizlights.h
USERMOD_WORDCLOCK
usermod_v2_word_clock.h
USERMOD_MY9291
usermode_MY9291.h
USERMOD_SI7021_MQTT_HA
usermod_si7021_mqtt_ha.h
USERMOD_SMARTNEST
usermod_smartnest.h
USERMOD_AUDIOREACTIVE
audio_reactive.h
USERMOD_ANALOG_CLOCK
Analog_Clock.h
USERMOD_PING_PONG_CLOCK
usermod_v2_ping_pong_clock.h
USERMOD_ADS1115
usermod_ads1115.h
USERMOD_BOBLIGHT
boblight.h
USERMOD_PWM_OUTPUTS
usermod_pwm_outputs.h
SD_ADAPTER
usermod_sd_card.h
USERMOD_KLIPPER_PERCENTAGE
usermod_v2_klipper_percentage.h
Disable Features
Flag
Description
WLED_DISABLE_OTA
Disables the feature to update firmware over the web interface. OTA is not possible for boards with 2MB flash only (like some Ai-Thinker ESP32-C3-12F models).