Servo
For driving the DC motor, we used PWM to quite directly switch the motor on and off. However, this is not the only use for PWM - it can also be used to transfer data, in this case by modulating the width of the pulses between 1000µs and 2000µs.
Servo motors time how long the pulse is on for and then go to an angle proportional to the length of the pulse: 0 degrees for 1000µs, 180 degrees for 2000µs and 90 degrees for 1500µs. Increase the voltage to 5V, and wire up the servo motor as shown in the following:
The brown wire should connect to ground; the red servo wire should be connected to 5V power and the yellow/orange wire should be connected to the function generator. Set the function generator to 50 Hz.