Arduino absolute Positioning

you are right about digitalread. I didn't copy paste right the code also I think it's a problem on format of library that I cant find it