You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shift is too much. for the first iteration of the loop 1<<(8-0) is 100000000 which is not the desired bit mask. The desired bit mask is 1000000. It should be 1<<(7-0)
for (bit=0; bit<8; bit++){
if ( (color[col] & (1<<(8-bit))) && (led == led_index) ) {
There is a comment from @VerusLogic in the related commit about this problem.
Fixed bit shift in demo application of using RMT peripheral. Init data array to be transmitted was off by one, as for the first iteration (i==0) the mask was 1<<8, which results in shifted RGB value in color variable
Closesespressif#2921
Fixed bit shift in demo application of using RMT peripheral. Init data array to be transmitted was off by one, as for the first iteration (i==0) the mask was 1<<8, which results in shifted RGB value in color variable
Closes#2921
In https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino lines 64 and 65 there is an off by one error.
The shift is too much. for the first iteration of the loop
1<<(8-0)
is100000000
which is not the desired bit mask. The desired bit mask is1000000
. It should be1<<(7-0)
There is a comment from @VerusLogic in the related commit about this problem.
4e96bff#diff-e59a7abf6f432b9f3d716a15f5f9b715
@david-cermak
The text was updated successfully, but these errors were encountered: