Arduino absolute Positioning

if(pin == HIGH){Two never equals one.

Must be about the third time this week - a new record?