i'm coding for multiple stepper motors (12) which can be addressed over 1 serial line. It is possible to address the motors individualy by their channel number.
the initialisation code looks like this:
SoftwareSerial ticSerial(10, 11); TicSerial tic1(ticSerial, 14); //for motor 1 TicSerial tic2(ticSerial, 15); //for motor 2 ..etc
and then a command for a specific motor looks like:
there's a long list of possible commands. my question is how to code without having to write separate lines for every possible motor and every possible command.
something like the following is not acceptable for the compiler:
char name = names;//array with names for the motors ** TicSerial name(ticSerial, nn);** error: conflicting declaration 'TicSerial& name' note: previous declaration as 'char name'
any help appreciated