Toggle swap GND and VCC

I have a motor that I want to control with an Arduino. I want to be able to apply 2.7V, 0V and -2.7 to make the motor turn forwards, stop and turn backwards.

I came up with a crappy solution using a mosfet, 3 relays and a step down converter. That's literally it. So it is a pretty simple circuit, but there has to be a better way...

O1 and O2 represent the two wires that do to the motor.

What you want is called an "H-Bridge"

Would that work? https://www.aliexpress.com/item/L9110S-DC-Stepper-Motor-Driver-Board-H-Bridge-for-Arduino-Free-Shipping-Dropshipping/1317611167.html

When I search for h-bridge, they all say 'stepper motor'. I don't think my motor is a stepper motor though.

H-bridges, or better two H-bridges, are commonly used with steppers. But you can use them for a DC motor as well. The module you like has 2 H-bridges on it. Both can do 800mA. It differs from a L298 in that it does not provide an enable line so you can't freewheel.

septillion:
H-bridges, or better two H-bridges, are commonly used with steppers. But you can use them for a DC motor as well. The module you like has 2 H-bridges on it. Both can do 800mA. It differs from a L298 in that it does not provide an enable line so you can't freewheel.

No, with steppers current-controlling stepper drivers are commonly used these days as most
steppers are low-impedance bipolar and voltage-drive is not reasonable for them. But we aren't
talking about steppers!

A lot of the dual H-bridges do say they can drive a stepper, but really that's confusing and bogus,
no-one does it that way for decades.