digitalWrite, digitalRead & pinMode implementation