I think the problem is very simple. In TIMER2_COMPA_vectyour setup function, you haveneed to instantiate your timer, like this code:
ISRstatic Timer timer;
void setup(TIMER2_COMPA_vect)
{
milliseconds++;timer = new Timer(); <<<--- here
callEveryMillisecondpinMode(millisecond13, OUTPUT);
}
void loop()
{
}
You have the variable milliseconds, which you increment, and then you call the callEveryMillisecond function and pass the variable millisecond (without the s)