The goal of this lab was to get acquainted with motors, exploring PWM and H-bridges through DC and Servo motors.
Part 1: Servo Motors
In this section, I used a photocell to control the speed of a Servo motor.
Here's the circuit:
Here's the code:
Here's the motor in action:
Part 2: DC Motors
In this section, I used an H-Bridge and a switch to control the direction of a DC motor.
Here's the circuit:
Here's the code:
Here's the motor in action:
Comments