Code for testing H-bridge.