The DXL_DIR_PIN setting is only meaningful is you are using the ROBOTIS DXL Shield with the DUE
And then it is supposed to be “2”
Also have you seen the following post? There seems to be a “voltage” problem because the DUE can only provide 3.3 V and the DXL Shield needs a minimum of 5 V. Also, the XL-320 needs 7.5 V to operate properly.