Quick question,

Is there any difference between this...

Adafruit_24bargraph bar = Adafruit_24bargraph();

and this....

Adafruit_24bargraph bar;

Both seem to compile ok, and both seem to run with the same functionality. I've seen both methods used, is there a difference?


When there are no arguments to pass to the constructor, the second method is preferred. When there are arguments, the first works, but is not the best way.

Adafruit_24bargraph bar(arg1, arg2);

is preferred when there are arguments.

Thanks Paul