mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-10 22:34:25 +02:00
Updated FAQ #11 (markdown)
@@ -46,9 +46,9 @@ 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) :
|
||||
PixelRef(NeoPixelBusType& pixelStrip) :
|
||||
_strip(pixelStrip) {
|
||||
}
|
||||
|
||||
@@ -57,11 +57,10 @@ template<typename T_PIXEL_METHOD> class PixelRef {
|
||||
}
|
||||
|
||||
private:
|
||||
T_PIXEL_METHOD& _strip;
|
||||
NeoPixelBusType& _strip;
|
||||
};
|
||||
|
||||
|
||||
PixelRef<NeoPixelBusType> myPixelRef(strip);
|
||||
PixelRef myPixelRef(strip);
|
||||
|
||||
void setup() {
|
||||
strip.Begin();
|
||||
|
Reference in New Issue
Block a user