Figure out PWM code