From the course: Learning Arduino: Pulse Width Modulation

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Challenge: Controlling a DC motor with an H bridge and potentiometer

Challenge: Controlling a DC motor with an H bridge and potentiometer - Arduino Tutorial

From the course: Learning Arduino: Pulse Width Modulation

Challenge: Controlling a DC motor with an H bridge and potentiometer

- Alright, it's time for your final challenge. In this challenge, I want you to control the speed and direction of a DC motor with a potentiometer. For analog input values 500 to 524, the motor should stop. Values greater than or equal to 525 should spin the motor in one direction. As the value increases, the motor speed should increase. For analog values less than 500, turn the motor in the other direction. As the value decreases, the motor speed should increase. Try not to spend more than 30 minutes on this. When you're ready, be sure to check out my solution video to see how I solved this problem.

Contents