MOVED: Arduino code doesn't work as expected, Seems to be a digitalWrite issue?

This topic has been moved to Programming Questions.
"Installation & Troubleshooting
For problems with Arduino itself, NOT your project "
http://forum.arduino.cc/index.php?topic=219914.0