WLED icon indicating copy to clipboard operation
WLED copied to clipboard

Added POV image effect

Open Liliputech opened this issue 2 years ago • 12 comments

Setup is really easy, after first boot and WiFi/LEDs setup: go to wled.local/edit and upload a couple image to WLed's filesystem. Only PNG is supported right now, further support for GIF is planned. The image should be as wide as the 1D segment you want to apply to.

When done, go to the Effect page on the UI, select "POV Image" effect.

There should be a new selector, near the Effect Speed slider. You can use that selector to set the image for display on POV.

You could also update the image with a post to the JSON-API like this: curl -X POST http://[wled]/json/state -d '{"seg":{"id":0,"fx":114,"f":"/axel.png"}}'

The segment should move at around 120RPM (that's 2revolutions per seconds) for an image to showup. More informations and pictures here : https://www.instagram.com/lumina.toys/

Liliputech avatar Nov 23 '23 00:11 Liliputech

Thank you for the contribution. Looks like a nice enhancement, however...

Before this gets merged, please do the following:

  • move all file handling functions into file.cpp
  • move all segment drawing functions into FX.cpp
  • remove all unnecessary *.h files (the ones that parent *.htm didn't receive updates)
  • remove file property from Segment class and use segment name instead.
  • remove file extension from effect filters (there is no need for that)
  • modify file selector to be displayed beneath segment name input field
  • make sure only GIF and PNG files are displayed (do not hide just cfg.json and presets.json)
  • make sure this works in AP mode as well (I am not sure /edit works without internet)
  • please provide memory footprint for ESP8266 and ESP32 (flash and RAM)

I would personally suggest to make a usermod from this as including additional libraries may be problematic for ESP8266 as it is already on the verge of usability.

blazoncek avatar Nov 23 '23 08:11 blazoncek

Hello Kristan, Alright, I'll work on all those separate points asap. I was also thinking of making this a usermod. Keep in touch

Liliputech avatar Nov 27 '23 09:11 Liliputech

I moved mostly everything to a Usermod, but still some work to do.

Liliputech avatar Dec 01 '23 05:12 Liliputech

Do not force push changes. Please. If you mess up things just open a new PR.

blazoncek avatar Dec 01 '23 07:12 blazoncek

Hi Kristan, I still have a question, given my patch do change index.js file (even in its usermod version) am I not supposed to re-generate the html_ui.h file and add it to the changes? Best,

Liliputech avatar Dec 03 '23 21:12 Liliputech

Building in release mode Compiling .pio/build/esp32c3dev/src/wled00.ino.cpp.o Retrieving maximum program size .pio/build/esp32c3dev/firmware.elf Checking size .pio/build/esp32c3dev/firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [==== ] 44.5% (used 145964 bytes from 327680 bytes) Flash: [========= ] 90.4% (used 1421534 bytes from 1572864 bytes)

Liliputech avatar Dec 05 '23 17:12 Liliputech

Sorry for late reply. Changing index.js for purposes of usermod is out of the question as the usermod is optional feature. ATM I have no solution for this problem (selecting filenames in UI).

It is possible to hack into Info page and (with clever approach) use it to select a file. But it may be a dirty hack. It is also possible to add a HTTP handler and serve custom HTML page for such purpose.

Will get back if I have any idea how to get those.

blazoncek avatar Dec 05 '23 19:12 blazoncek

Hi Kristan, Ok, I'll make some changes to my commit with your advice and provide a better version. Just thinking out loud, what if I create like "yet another web UI" for WLED dedicated to my purpose? Just like PixelMagicTool did at the time? Then I would be able to compile and install it from source as well as everyone else along with WLED, without the need for me to put too much crap in the original WLED repository? what do you think? Like this one? https://github.com/Aircoookie/WLED/pull/3042 Best,

Liliputech avatar Dec 12 '23 21:12 Liliputech

Hey! This pull request has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. Thank you for contributing to WLED! ❤️

github-actions[bot] avatar May 21 '24 12:05 github-actions[bot]

Hi. please take a look at #3835 for idea how to use segment name as an image selector. And update the PR for 0_15 branch.

blazoncek avatar May 22 '24 05:05 blazoncek

Hello Kristan, I've lost the credentials to my github account >< I've started the recovery procedure and will make some update to this branch ASAP :) Best, Arthur

----- Mail original -----

De: "Blaž Kristan" @.> À: "Aircoookie/WLED" @.> Cc: "Liliputech" @.>, "Author" @.> Envoyé: Mercredi 22 Mai 2024 07:34:47 Objet: Re: [Aircoookie/WLED] Added POV image effect (PR #3539)

Hi. please take a look at #3835 for idea how to use segment name as an image selector. And update the PR for 0_15 branch.

— Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: <Aircoookie/WLED/pull/3539/c2123900851 @ github . com>

Liliputech avatar May 28 '24 21:05 Liliputech

Just dropping in to say that I absolutely love this!! 😍

Manut38 avatar Jun 25 '24 10:06 Manut38

Hi, I've rebased my commit on top of 0_15 branch :) I've also tried with https://github.com/Manut38/WLED-GifPlayer-html -> works like a charm except the filename sent is missing a "/" before the filename. Hope this is going to be merged soon :)

Liliputech avatar Aug 07 '24 10:08 Liliputech

Thank you very much for your approval! Can't wait for this change to be merged :)

Liliputech avatar Aug 10 '24 08:08 Liliputech