8x8 Matrix - Hall sensor error

Did you put it inside the setup, and use a pinMode(13, INPUT)