added getPeriod() to Pwm