Testing function to read pin