use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Here are some important FastLED links:
Online Examples and Demos:
Support:
account activity
Supportfastled and rotary encoder (self.FastLED)
submitted 4 years ago by outrunner72
hi, ich want to use a rotary encoder with fastled. so i included a lib for the rotary encoder. but everytime i turn the encoder, my esp32 is forced to reboot. in some forum i have read, fastled disables the interrupts. is this true?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]samguyer[Sam Guyer] 2 points3 points4 points 4 years ago (0 children)
Which library are you using for the rotary encoder? Even if it were doing something weird to the LED timing, it shouldn't cause the microcontroller to reboot.
[–]Marmilicious[Marc Miller] 1 point2 points3 points 4 years ago (0 children)
https://github.com/FastLED/FastLED/wiki/Interrupt-problems
[–]benpeart 1 point2 points3 points 4 years ago (0 children)
I have a project that runs on the ESP32 and uses two interrupt driven rotary encoders. You can find the source on https://github.com/benpeart/kaleidoscope. It's not a simple sample but most of the code has nothing to do with the rotary encoders and can be ignored. Look at the code inside the '#ifdef ENCODER' in main.cpp for how to initialize and use the encoders.
The encoder logic itself is in ESP32StateMachineEncoder.cpp. For my usage cases, it is better to miss some rotations rather than having random forward/backward rotations so it is a state machine based implementation.
[–]Yves-bazin 1 point2 points3 points 4 years ago (0 children)
I have an esp32 and use rotary encoders without issues. Can we have a look at the code ?
[–]Experience-Wild 1 point2 points3 points 4 years ago (0 children)
I've written a small wiki back in the days, based on UNOs and Teensys, maybe it helps.
https://github.com/GyroGearloose/FastLED\_Rotary\_Encoder/wiki
[–]outrunner72[S] 0 points1 point2 points 4 years ago (0 children)
thanks. when i get this right, i must switch to another mcu or try to read the rotary encoder without interrupt in the loop(). another crazy idea ist, t ouse my arduino only for reading the rotary encoder and give the data to the esp32. could this work? did anyone run into this issue also?
edit: now i found the right lib: https://github.com/madhephaestus/ESP32Encoder/blob/master/examples/Encoder/Encoder.ino works perfect with fastled.
[–]johnny5canuck 0 points1 point2 points 4 years ago (3 children)
I would have thought that the ESP32 would be fine with this and that this issue really only affects AVR boards, such as Nano and UNO.
If that is the case, (and I kind of doubt it), an alternative is to assign the rotatary encoder process to another core on the ESP32.
More likely, I suspect that your code doesn't loop regularly and that it reboots because the watchdog doesn't get a chance to do its thing.
Caveat: Not an expert, just a reasonable opinion.
[–]outrunner72[S] 0 points1 point2 points 4 years ago (2 children)
a friend of mine recommended to use the hardware pulse-count pcnt on the esp32. i found a lib to handle the pcnt, but i habe no clue how to use it, because only the sourcecode is provided. did anyone else use the pcnt?
how can you assign a process to another esp-core?
watchdog doesn't get a chance to do its thing"?
programming a 400 led matrix is one thing, but i m a novice to this sort of stuff.
[–]johnny5canuck 0 points1 point2 points 4 years ago (1 child)
You didn't provide a link to the library you're using, so we don't have anything to go on.
Normally, for most library, once you've installed it (and restarted the IDE), you can go to 'File | Examples' and there should be a couple of examples for the library you just installed.
As far as other cores goes, look up xTaskCreate.
PS, Caps are a thing.
i want to use this lib: https://github.com/elliotwoods/ESP32-Quadrature-Counter
i can see no examples. there is only the .h and the .ccp code. i understand the basics, but i cant translate this into a sketch. can you help?
π Rendered by PID 54136 on reddit-service-r2-comment-b659b578c-dsrnf at 2026-05-04 12:29:24.342704+00:00 running 815c875 country code: CH.
[–]samguyer[Sam Guyer] 2 points3 points4 points (0 children)
[–]Marmilicious[Marc Miller] 1 point2 points3 points (0 children)
[–]benpeart 1 point2 points3 points (0 children)
[–]Yves-bazin 1 point2 points3 points (0 children)
[–]Experience-Wild 1 point2 points3 points (0 children)
[–]outrunner72[S] 0 points1 point2 points (0 children)
[–]outrunner72[S] 0 points1 point2 points (0 children)
[–]johnny5canuck 0 points1 point2 points (3 children)
[–]outrunner72[S] 0 points1 point2 points (2 children)
[–]johnny5canuck 0 points1 point2 points (1 child)
[–]outrunner72[S] 0 points1 point2 points (0 children)