some improved GPIO handling. Better response from the get_course function.