Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1c7e329

Browse filesBrowse files
david-cermakme-no-dev
authored andcommitted
RMT: Fix in bitshift of NeoPixel example project (espressif#2986)
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 espressif#2921
1 parent c17b212 commit 1c7e329
Copy full SHA for 1c7e329

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino

Copy file name to clipboardExpand all lines: libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void loop()
6262
for (led=0; led<NR_OF_LEDS; led++) {
6363
for (col=0; col<3; col++ ) {
6464
for (bit=0; bit<8; bit++){
65-
if ( (color[col] & (1<<(8-bit))) && (led == led_index) ) {
65+
if ( (color[col] & (1<<(7-bit))) && (led == led_index) ) {
6666
led_data[i].level0 = 1;
6767
led_data[i].duration0 = 8;
6868
led_data[i].level1 = 0;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.