Reading and writing working

Tested arbitrarily with a test pin. Further testing needed