Whenever you're ready, walk me through how you'd approach this.
Write the C implementation of a finite state machine that outputs various voltages from a pin on a microcontroller.