corrected scripts for PiFace with read and write ports