Skip to content

Commit

Permalink
Change latch time to 300 uS for latest WS2812B pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintYourDragon committed May 4, 2017
1 parent 9cd8de7 commit ec1614a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
19 changes: 3 additions & 16 deletions Adafruit_NeoPixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void Adafruit_NeoPixel::show(void) {

if(!pixels) return;

// Data latch = 50+ microsecond pause in the output stream. Rather than
// Data latch = 300+ microsecond pause in the output stream. Rather than
// put a delay at the end of the function, the ending time is noted and
// the function will simply hold off (if needed) on issuing the
// subsequent round of data until the latch time has elapsed. This
Expand Down Expand Up @@ -1475,8 +1475,8 @@ void Adafruit_NeoPixel::show(void) {
break;
}

// re-send need 50us delay
delayMicroseconds(50);
// re-send need 300us delay
delayMicroseconds(300);
}

// Enable interrupts again
Expand Down Expand Up @@ -2020,16 +2020,3 @@ uint8_t Adafruit_NeoPixel::getBrightness(void) const {
void Adafruit_NeoPixel::clear() {
memset(pixels, 0, numBytes);
}













2 changes: 1 addition & 1 deletion Adafruit_NeoPixel.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class Adafruit_NeoPixel {
uint32_t
getPixelColor(uint16_t n) const;
inline bool
canShow(void) { return (micros() - endTime) >= 50L; }
canShow(void) { return (micros() - endTime) >= 300L; }

private:

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit NeoPixel
version=1.1.0
version=1.1.1
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino library for controlling single-wire-based LED pixels and strip.
Expand Down

0 comments on commit ec1614a

Please sign in to comment.