take the pin resolution from the pin object instead of using arduino values [fixes #4]