adafruit / Adafruit_NeoPixel

Arduino library for controlling single-wire LED pixels (NeoPixel, WS2812, etc.)
GNU Lesser General Public License v3.0
3.07k stars 1.27k forks source link

Maybe an improvement in example code. #362

Open zhshuai1 opened 1 year ago

zhshuai1 commented 1 year ago

https://github.com/adafruit/Adafruit_NeoPixel/blame/fe882b84951bed066764f9350e600a2ec2aa5a9e/examples/simple/simple.ino#L48 It seems that the pixels.show() and delay() line should be outside of the for loop? Or there will be obvious twinkle and low refresh frequency. I tried a version in which I moved the two line outside of the for loop. It works fine. If this is the case, I could create one mr to fix this.