example code for efficient software pulse width modulation (PWM) on a Raspberry Pi