Updated to allow using GPIO versioning to make it compatible with several versions of hardware.