Removed library dependence of code

also included general function to read(burst) and write using wire.h
library