If you want to control an DC motor that can run forward or reverse you can do that in many ways. But I want to tell you the simplest way.
View More L293D motor driver with arduinoTag: microcontroller
Understanding Voltage Divider
Unfortunately, your arduino can sense voltage only from 0V-5V. That’s why voltage divider come in handy.
View More Understanding Voltage Divider