MutilaNeoPixel
Wrapper for Adafruit_NeoPixel with millis() drift correction
Public Member Functions | List of all members
MutilaNeoPixel Class Reference

MutilaNeoPixel. More...

#include <MutilaNeoPixel.h>

Inheritance diagram for MutilaNeoPixel:
Inheritance graph

Public Member Functions

 MutilaNeoPixel (uint16_t n, uint8_t p=6, neoPixelType t=NEO_GRB+NEO_KHZ800)
 Construct a MutilaNeoPixel object.
 
void show (void)
 Send updated pixel state to LEDs, and update Millis() offset.
 

Detailed Description

MutilaNeoPixel.

When the Adafruit_NeoPixel.show() member is called interrupts are temporarily disabled to allow the precise timing required when sending data out to the WS2811 LEDs. This has a few side-effects, including a drift in the timer which is used by millis().

This is usually a small effect, but when a long strip of LEDs is updated frequently, the offset can add up and become noticable. In one application, the author noticed the value of millis being 50% slower than real time!

This class is a simple sub-class of the Adafruit_NeoPixel class which estimates the offset to the millis timer, and updates the offset used in Mutila's Millis() call.

Definition at line 20 of file MutilaNeoPixel.h.


The documentation for this class was generated from the following files: