Bug fix in IO Pi library

Bug fix in the invertPin method, wrong variable names.