Howto: compiling WLED on linux via platformio (without the need for Visual Studio)

Hi, I was looking for a way to compile WLED without the need for Visual Studio (which I find somewhat confusing), and I wanted to share the following recipe with the community. It may be obvious to some, but I hope that this will be of help to at least a few people:

Assuming you have a recent version of Debian (11), and python3 installed, you can use the following commands to get a working firmware file for WLED. As an example, I made one with the Analog Clock usermod for my ESP8285 so I could change the colors of the hour/minute/second hands.

mkdir ~/WLED
cd ~/WLED
sudo apt-get install python3-venv
python3 -m venv platformio
source platformio/bin/activate
pip3 install platformio
git clone https://github.com/Aircoookie/WLED.git
cd WLED/
cp usermods/Analog_Clock/Analog_Clock.h wled00/
nano platformio.ini
# add "-D USERMOD_ANALOG_CLOCK=true" somewhere around line 114 where all the other build flags are listed
# optional: comment out line 13 with all the different envs (chips)
# and uncomment the one you want (for example for an ESP8285) line 21: "default_envs = esp01_1m_full"
pio run
# YOUR FIRMWARE WILL BE IN ~/WLED/build_output/firmware/
4 Likes

Amazing. Thanks

1 Like