Updated FAQ #11 (markdown)

Michael Miller
2017-07-27 19:50:50 -07:00
parent fa4ff10a6b
commit ac8375f37f

@@ -46,22 +46,21 @@ typedef NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> NeoPixelBusType;
NeoPixelBusType strip(4, 2);
// example class using a reference; requires all code to be in the include
template<typename T_PIXEL_METHOD> class PixelRef {
class PixelRef {
public:
PixelRef(T_PIXEL_METHOD& pixelStrip) :
_strip(pixelStrip) {
PixelRef(NeoPixelBusType& pixelStrip) :
_strip(pixelStrip) {
}
void Draw() {
void Draw() {
_strip.Show();
}
private:
T_PIXEL_METHOD& _strip;
NeoPixelBusType& _strip;
};
PixelRef<NeoPixelBusType> myPixelRef(strip);
PixelRef myPixelRef(strip);
void setup() {
strip.Begin();