Project VAG: Using Arduino Due for current control

Zero crossing detection must have precedence, because it is required to synchronize the output signal.

The wave output can be implemented interrupt-driven, using a timer, or on another dedicated controller.