-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling RMT/semaphores in complex code can cause analogread to return values 2x too big #290
Comments
This feels like it could be a power glitch. Do you still see the bug if you reconfigure RMT to use a different pin which isn't connected to RGB LEDs? |
example code showing the failure: marcmerlin/IoTuz@305b9f7
I still get: |
Hi @projectgus, since this is likely a platform problem (can't tell if it's arduino-esp32 or the chip underneath), is there someone this could get assigned to? |
Are you able to reproduce this on non-IoTuZ hardware? |
I will give that a shot since I now have some, and get back to you. |
I was able to reproduce on WROVER, but I then updated arduino-esp32 again, and as of |
As first reported here MartyMacGyver/ESP32-Digital-RGB-LED-Drivers#7
using the RMT neopixel driver causes analogread to return 4096 for 50%-100% and proper values from 0 to 50%.
Sadly if you are sampling data that needs to go in the 50 to 100% range (joystick), it's impossible to get usable data.
If i comment out just these 3 lines of code, then analogread works properly again:
//RMT.conf_ch[RMTCHANNEL].conf1.mem_rd_rst = 1;
//RMT.conf_ch[RMTCHANNEL].conf1.tx_start = 1;
//xSemaphoreTake(ws2812_sem, portMAX_DELAY);
The text was updated successfully, but these errors were encountered: