Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.68k stars 3.16k forks source link

Error while compiling PIR usermod #2215

Closed Chillkroete1206 closed 3 years ago

Chillkroete1206 commented 3 years ago

Hi there,

I am trying to compile my own WLED binary for Wemos D1 mini with PIR-sensor support following this and this Documentation

Compiling via Visual Studio and PlatformIO results in the attached error. [Attached in a file due to backticks in the code, so if I would include it in my post, the backticks would interrupt the quote]

Can anybody help me with this error or maybe provide a compiled binary for HC-SR501 PIR sensor running with a Wemos D1 #mini?

Thanks in advance!

blazoncek commented 3 years ago

You only need to:

  -D USERMOD_PIRSWITCH
  -D PIR_SENSOR_PIN=16 # (D0) on D1mini

In your platformio_override.ini env. You can choose another pin of course.

From your error log it seems something wrong with your download. Use git to clone recent code.

Chillkroete1206 commented 3 years ago

Thanks for your reply. Which file in particular are you referring to?

I have several files named platformio_override.ini in various usermods folders (not in PIR_sensor_switch folder). Further there is one platformio_override.ini.sample file in the root (WLED) folder.

blazoncek commented 3 years ago

platformio_override.ini goes into wled folder

Chillkroete1206 commented 3 years ago

Hi,

my platformio_override.ini is included in the WLED-folder (not WLED00) and looks like this: platformio_override.ini. I just adjusted the board I am using and added the above mentioned commands.

Unfortunately an error keeps occuring .

Any ideas for the reason? Thanks for your assistance!

blazoncek commented 3 years ago

The error has nothing to do with platformio_override.ini but with the file being compiled. Redownload source code.

Chillkroete1206 commented 3 years ago

Thanks for your persistent support! You were right. I screwed up the usermod_PIR_sensor_switch.h on my previous attemts. Sorry for avoidable mistake.

After fixing the issue, I am not sure, if your advice with the modified platformio_override.ini is still required. So I tried both, but none of them went without error.

Errors: Clean Modified platformio_override.ini.txt

As you might have noticed earlier, I have absolutely no idea how to interprete the errors...

blazoncek commented 3 years ago

With platformio_override.ini you create your compile overrides that are not lost when you download a new version from GitHub. You have access to those if you click the ant/alien icon on the left icon bar.

Upon first run you will often get errors, try to compile multiple times. And check YT video from Quindor for custom compiling WLED.

Chillkroete1206 commented 3 years ago

Im half done with the video. No solution discovered yet, but I keep trying.

Would meanwhile anybody be so kind and upload a compiled bin-file for the following setup?

I am highly interested in understanding my issue(s), but I next weekend I would like to install my setup with the PIR sensor. Your support is highly appreciated! Thank you so much!

blazoncek commented 3 years ago

Please join Discord for help and support. @srg74 is kind enough to provide pe-built binaries wit different usermods in his Wemos shield repo.

blazoncek commented 3 years ago

Closing, not a bug in code.