From 95bde8ea3502f151a8a5a7952fd7877c8c16f0c1 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Wed, 26 Jul 2017 12:07:54 -0700 Subject: [PATCH] Updated FAQ #11 (markdown) --- FAQ-#11.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/FAQ-#11.md b/FAQ-#11.md index 0e20290..160a4b7 100644 --- a/FAQ-#11.md +++ b/FAQ-#11.md @@ -1,4 +1,4 @@ -### How do store a reference to the NeoPixelBus in another class? +### How do I store a reference to the NeoPixelBus in another class? Since the NeoPixelBus is a template class; you can't just store a reference to it using older models. But there are two ways to accomplish this. @@ -10,13 +10,11 @@ typedef NeoPixelBus NeoPixelBusType; NeoPixelBusType strip(4, 2); -// example class using a reference; requires all code to be in the include -template class PixelRef -{ +// example template class using a reference; requires all code to be in the include +template class PixelRef { public: PixelRef(T_PIXEL_METHOD& pixelStrip) : _strip(pixelStrip) { - } void Draw() {