L298N two pin connection to arduino?

You need to check that the 2 to 4 pin conversion circuit is actually working - each transistor should be inverting the logic signal it gets on its base - use multimeter. Check all the connections too.