Two wires, one motor - how to control

Hi, Duane Degn has given me some tantalising information - I have two L298N h-bridge motor contollers and he says that I could control one motor with just two pins from the Arduino. He also says these would involve a transistor. However, the main info that I need - how to actually wire this - is missing! :-) Can anybody show me how? What I want is to have one pin controlling the motor_enable on the motor controller, and the other when HIGH spinning the motor one way, in LOW state spinning the motor in the opposite direction. thanks.

This it?

https://www.robotshop.com/letsmakerobots/node/32208

 

For reference

What is being added is a NOT gate made with an NPN transistor and 2 resistors. I often have suggested, and, seen this suggested. The arguement against doing it is, you loose the ability to brake(?)/coast(?) when you tie both pins together in this manner. I won’t say it is a loss, just something to be aware of.

Thanks all

Thanks for all the info, I actually knew you could use a NOT gate but I thought Duane meant using only one transistor (this intrigued me somewhat). I’ll might use a NOT IC chip as I have a few kicking around, but don’t have very many transistors.

 

Thanks again!