Lab Objectives
- Use PWM to drive a servo motor
- Use an H-bridge to drive a DC motor
Materials
- Breadboard & hookup wire
- Arduino
- variable resistor
- RC Servo motor
- Switch
- H-bridge
- DC motor
Part 1
This lab uses the servo library to control the position of a servo according to a variable resistor. In my case I used a sliding pot.
The code was taken from Arduinos knob example https://www.arduino.cc/en/Tutorial/Knob
Part 2
In part 2 we used an H-bridge to change the direction of current in order to change the direction of the DC Motor.