added the pwmtick function to the wave library