I've recently been learning about Classes and see now the benefit they hold in making programs run smoother and having less code in your sketch overall. Here is where I'm stuck a little:
Let's say I want to control 4 motors, and I make an intance for each one with my desired functions (or methods). Most of the time I will want to control each one individually but sometimes I will want to run commands that affect all of them (increase speed overall, shutoff, etc...).
I suppose I could write the same command four times to each one and control them that way, but it got me wondering as to whether there exists some special functions I can use to control all instances of a class. Like change a state or a flag accross all of them. Is this available?
Thanks in advance.