minor fixes
Merge branch 'pio' into pio-theo
Added tests for reading and setting pin levels
Fixed merge conflicts