Basic Information:
Printer Model: Ender 3v2
Describe your issue:
I’m looking for some advice on how to proceed with a macro I want to create. I have some pixels in my enclosure that I use as a light source but I want to expand on that. The first macro I’d like to write is to have a portion of them flash for an extend period of time (30 minutes or so) or until an acknowledgment with a button. Calling the button and making them flash isn’t an issue. What I’m struggling with is finding a way to interrupt the flashing with a button. This would be an easy task in other languages but Jinja2 doesn’t support interrupts, Do or While loops. I thought about making a for loop with a large count and pass a variable of a much smaller number to the loop with the button to stop it but I’m having a hard time finding how to pass variables between macros and I doubt that would work anyway since the flash macro would already be running.
Can you great folks give me some ideas on how to get around this limit? I’m not new to programming (not an expert either) but Jinja2 is very new and very different to me.
Thanks in advance.