added C++ PWM for motor/LED example