Looking at the sevseg README file on GitHub I find this:
If you wish to use more than 8 digits, increase MAXNUMDIGITS in SevSeg.h.
Have you done that? Seems like that might be the problem.
As @slash-dev said, be sure to also modify the loop()
code as well:
void loop()
{
//local vars
static byte decPlace = 0;
sevseg.setNumber(8888,decPlace);
decPlace++;
decPlace %= numDigits;
I think it makes more sense to use numDigits
rather than a hard coded constant that you have to remember to change whenever you change the number of digits in your display. It would be worth checking the code for any other hard coded constants. If space is an issue, it might be worth checking to see if using a #define
results in smaller code than using a variable – in any case do something to avoid needing to understand what "magic numbers" are doing. This is especially important when the same numeric value (e.g., 4) is being used for multiple reasons. Then it gets hard if you need to change the value as you have to understand the purpose behind each use.
Looking at the sevseg README file on GitHub I find this:
If you wish to use more than 8 digits, increase MAXNUMDIGITS in SevSeg.h.
Have you done that? Seems like that might be the problem.
Looking at the sevseg README file on GitHub I find this:
If you wish to use more than 8 digits, increase MAXNUMDIGITS in SevSeg.h.
Have you done that? Seems like that might be the problem.
As @slash-dev said, be sure to also modify the loop()
code as well:
void loop()
{
//local vars
static byte decPlace = 0;
sevseg.setNumber(8888,decPlace);
decPlace++;
decPlace %= numDigits;
I think it makes more sense to use numDigits
rather than a hard coded constant that you have to remember to change whenever you change the number of digits in your display. It would be worth checking the code for any other hard coded constants. If space is an issue, it might be worth checking to see if using a #define
results in smaller code than using a variable – in any case do something to avoid needing to understand what "magic numbers" are doing. This is especially important when the same numeric value (e.g., 4) is being used for multiple reasons. Then it gets hard if you need to change the value as you have to understand the purpose behind each use.
Looking at the sevseg README file on GitHub I find this:
If you wish to use more than 8 digits, increase MAXNUMDIGITS in SevSeg.h.
Have you done that? Seems like that might be the problem.