Arduino How To Control DC Motors

A collection of tutorials that show you how to control  DC motors using an Arduino Micro Controller.

How the motors are controlled is hardware dependent.

Please Support Us By Looking At Our Shop
Please Support Use By Going Here.

 Control a DC motor with a L298N. –

How to connect your “L298N Dual H-Bridge Motor Controller” to “Arduino Uno” –

Controllin DC Motors Part 1

Code explanation of l293d motor driver Arduino tutorial

How to get started with L293D motor shield

Understanding How to Control DC Motors in Projects – Detailed and simple

Controlling DC Motor Speed and Direction with push-buttons –  A follow on to the tutorial above.

IR Controlled DC Motor using Arduino– – Shows how to control a motor with a relay and IR detector.

The code to do this is just below.

) Rotate DC motor forward and reverse at set speed (withspeed control)


/*this program will rotate DC motor forward for 5 sec

at 40%speed then stop for 2 sec and again rotate motor reverse for

5 sec at 80% speed continuously



DC_Motor motor2(9, 10, 1);




void loop()
















We hope that you found the information in this page useful. The internet is all about getting and giving. And giving back is the best. Please donate $1 or more to aid us in our continuing quest to add to and polish the information in our site.

Scroll to top