fixed for v2 electronics. now uses arduino style port manipulation.