Can't see much wrong with the code (except there's too much of it, and it isn't enclosed in code tags) - have you checked your wiring?
Also, not a good idea to use serial pins for other I/O - you may want to use them for debugging.
Can't see much wrong with the code (except there's too much of it, and it isn't enclosed in code tags) - have you checked your wiring?
Also, not a good idea to use serial pins for other I/O - you may want to use them for debugging.