Fix pin numbers for analog timer handler
Add checkargs to pin.writepwm