Added tests for reading and setting pin levels