Removing unnecessary validation on pin creation.
Added interval to digitalRead.