Hi Brian,
The DIR pin number is hardcoded in the PID.ino at line 32 and 35 for the Cytron driver.
I would suggest to use:
if (pwmDrive >= 0) bitSet(PORTD, DIR1_RL_ENABLE); //set the correct direction else { bitClear(PORTD, DIR1_RL_ENABLE); pwmDrive = -1 * pwmDrive; }
instead of :
if (pwmDrive >= 0) bitSet(PORTD, 4); //set the correct direction else { bitClear(PORTD, 4); pwmDrive = -1 * pwmDrive; }