I'm extending the Adafruit_NeoPixel library with my own library, So I don't have to write all my common code for the projects i'm doing in the sketch.
However when trying to either pass the Adafruit_NeoPixel "strip" variable into my own library, I get this error, I think it is cause im declaring an empty variable and that's not supported?
- I've mostly written things in c#, and there's a few differences
Code: Select all
NeoHelperLib.cpp:5: error: no matching function for call to 'Adafruit_NeoPixel::Adafruit_NeoPixel()'
Adafruit_NeoPixel.h:47: note: candidates are: Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t, uint8_t, uint8_t)
Adafruit_NeoPixel.h:42: note: Adafruit_NeoPixel::Adafruit_NeoPixel(const Adafruit_NeoPixel&)
Sketch
Code: Select all
#include <Adafruit_NeoPixel.h>
#include <NeoHelperLib.h>
Adafruit_NeoPixel strip = Adafruit_NeoPixel(8, 7);
NeoHelper np = NeoHelper(strip);
.h
Code: Select all
class NeoHelper
{
include "Adafruit_NeoPixel.h"
public:
NeoHelper(Adafruit_NeoPixel strip );
Code: Select all
class NeoHelper
{
#include "Adafruit_NeoPixel.h"
Adafruit_NeoPixel NeoStrip;
NeoHelper::NeoHelper(Adafruit_NeoPixel strip)
{
NeoStrip= strip;
};