First project! Arduino uno r3 says "no matching function for call to 'SevSeg::SevSeg()'"

745 Views Asked by At

I was following this tutorial, and everything is wired correctly as far as I can tell, but my 7seg display is only showing 8888. I tried uploading the code to the controller but I get back "no matching function for call to 'SevSeg::SevSeg()'" I'm not sure what I'm doing wrong. Any help would be greatly appreciated. Thank you!

full error message:


DaysCounterTest:4:8: error: no matching function for call to 'SevSeg::SevSeg()'

 SevSeg sevseg; //Instantiate a seven segment controller object

        ^~~~~~

In file included from C:\Users\Cel\Documents\Arduino\DaysCounterTest\DaysCounterTest.ino:2:0:

C:\Users\Cel\Documents\Arduino\libraries\Firmware/SevSeg.h:49:3: note: candidate: SevSeg::SevSeg(byte*, byte*, byte, byte, bool, bool, bool)

   SevSeg( byte segmentPinsIn[], byte digitPinsIn[], byte numDigitsIn = 4, byte hardwareConfig = COMMON_ANODE,

   ^~~~~~

C:\Users\Cel\Documents\Arduino\libraries\Firmware/SevSeg.h:49:3: note:   candidate expects 7 arguments, 0 provided

C:\Users\Cel\Documents\Arduino\libraries\Firmware/SevSeg.h:46:7: note: candidate: constexpr SevSeg::SevSeg(const SevSeg&)

 class SevSeg

       ^~~~~~

C:\Users\Cel\Documents\Arduino\libraries\Firmware/SevSeg.h:46:7: note:   candidate expects 1 argument, 0 provided

C:\Users\Cel\Documents\Arduino\libraries\Firmware/SevSeg.h:46:7: note: candidate: constexpr SevSeg::SevSeg(SevSeg&&)

C:\Users\Cel\Documents\Arduino\libraries\Firmware/SevSeg.h:46:7: note:   candidate expects 1 argument, 0 provided

C:\Users\Cel\Documents\Arduino\DaysCounterTest\DaysCounterTest.ino: In function 'void setup()':

DaysCounterTest:87:50: error: no matching function for call to 'SevSeg::begin(byte&, byte&, byte [4], byte [8], bool&, bool&, bool&, bool&)'

   updateWithDelays, leadingZeros, disableDecPoint);

                                                  ^

In file included from C:\Users\Cel\Documents\Arduino\DaysCounterTest\DaysCounterTest.ino:2:0:

C:\Users\Cel\Documents\Arduino\libraries\Firmware/SevSeg.h:53:8: note: candidate: void SevSeg::begin(byte*, byte*, byte, byte, bool, bool, bool)

   void begin( byte segmentPinsIn[], byte digitPinsIn[], byte numDigitsIn = 4, byte hardwareConfig = COMMON_ANODE,

        ^~~~~

C:\Users\Cel\Documents\Arduino\libraries\Firmware/SevSeg.h:53:8: note:   candidate expects 7 arguments, 8 provided

exit status 1

no matching function for call to 'SevSeg::SevSeg()'



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
1

There are 1 best solutions below

1
Cel F On

I noticed my links were not posted in my original post. I found that the libraries I needed were not importing correctly, more specifically the sevseg one. I needed to import another one with it. Now the 7 seg display is showing up correctly