DC Motor controlled by DPDT Relay & Buttons

I'm working in a project in which two buttons control a Motor; one button turns the motor on or off and the other button changes the direction of the motor's rotation.

I was able to make one button change the motor's spin direction using a DPDT relay which is controlled by a Transistor
(P2N2222AG) "HIGH for one spin direction & LOW for other spin direction".

However i don't know how to turn the motor off using the other button. Is it possible to cut the current for example?
Do i have to make changes to my circuit or just some extra code might fix the issue?

A sketch would be helpful.

A DPDT relay only has two states so it can either control direction or on/off, but not both. You would need a third relay to provide ON/OFF functionality.

You might consider a h-bridge motor controller. It is the electronic equivalent of a DPDT switch with the added advantage that it can switch the motor of and (under control from a PWM - analogWrite()- signal from the Arduino) can control the speed of the motor. It will require more connections to the Arduino. Obviously you need to choose a h-bridge that can match the current and voltage needed y your motor.

...R

A schematic would be helpful since you are asking question about current. Draw a schematic with pen and paper and take a photo with your cell phone and post it using the "Additional Options" button in the lower left corner of the screen.