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