Go Down

Topic: FastLED.h and Pin.h can not be used in the same program (Read 75 times) previous topic - next topic


Hi, can annyone help me out with this:

When we have a sketch where we need to use fast in and outputs, then the libarary Pin.h is a faster way then digital.read and digital.write.

but when I want to use a Ledring (40 leds) I also need in this same sketch FastLED.

So the beginning of this sketch is:

#include <Pin.h>
#include <PinGroup.h>
#include <FastLED.h>

but when you try to compile this, you get the next error report:

In file included from C:\Users\Gebruiker\Documents\Arduino\libraries\FastLED/FastLED.h:48:0,

                 from C:\Users\Gebruiker\DWEN bvba Dropbox\Arduino Program\Arduino\Mona lisa\Ledring2\Ledring2.ino:4:

C:\Users\Gebruiker\Documents\Arduino\libraries\FastLED/fastpin.h:34:7: error: redefinition of 'class Pin'

 class Pin : public Selectable {


In file included from C:\Users\Gebruiker\DWEN bvba Dropbox\Arduino Program\Arduino\Mona lisa\Ledring2\Ledring2.ino:2:0:

C:\Users\Gebruiker\Documents\Arduino\libraries\Pin\src/Pin.h:39:7: error: previous definition of 'class Pin'

 class Pin {

exit status 1
Fout bij het compileren voor board Arduino/Genuino Mega or Mega 2560

So they can not be combined together ??


Looks like you need to go in and rename some stuff.  Too bad I don't have a link to those libraries, I would have taken a look at it for you. 
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.


Some libraries are incompatible with some other libraries, at least until you make some changes yourself.

Go Up