Motorz::Motorz(int speedL, int brkL, int dirL, int speedR, int brkR, int dirR)
{
// Left motor
pinMode(speedL, OUTPUT);
_speedL = speedL;
pinMode(brkL, OUTPUT);
_brkL= brkL;
pinMode(dirL, OUTPUT);
_dirL = dirL;
// Right motor
pinMode(speedR, OUTPUT);
_speedR = speedR;
pinMode(brkR, OUTPUT);
_brkR= brkR;
pinMode(dirR, OUTPUT);
_dirR = dirR;
// Left motor pin config
int speedL = 3;
int brkL = 9;
int dirL = 12;
// Right motor pin config
int speedR = 11;
int brkR = 8;
int dirR = 13;
*/
}
Why do you have an end of comment marker in this method?
Calling pinMode() in the constructor of your class is not a good idea. Your constructor is called before the init() function, that sets up the hardware, so pinMode()'s actions could well get overwritten later.
You should have a begin() method, like all other class that use pins, where the mode is set.