Direction Detection

@Mandalas, let us know how the answers above have failed to help you. What have you tried, what worked differently to how you expected? If you have the same problem then I have already given my answer to that problem.

@zhomeslice, With 295 posts and 66 karma points, I can't imagine why you would be asking that basic question. Translation problem? "State" means the existence of HIGH or LOW on the pin.