neopixel and threading
-
Hello there,
This christmas light project of mine turned out to be a great programming challenge also. (And I missed the deadline ofc, maybe next time :D )
So I am using a neopixel strip, and have different programs/scenes/methods to control the led strip.
And I thinking a way of changing between the scenes. Right now I have a button, with a press of a button it should go the next scenes. Some schenes are just static, some of them have a varios action in them some shorter, some longer.So the my question:
What should be the best practice for cycling throw these schenes?
I was thinking about threading, if I push the button I would kill the previous thread and start the next one. But I think there is no threading (with thread.start /.stop) just _thread, which is very limited
Other idea, is that with every schene method I pass a button parameter, and if I push the button exit from it.
These are my two idea, can you recommend me a third maybe more practical?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login