Isn't digital pin 4 used by the Ethernet shield?
Probably not the cause of your problems but just noticed when looking over your code..
Isn't digital pin 4 used by the Ethernet shield?
Probably not the cause of your problems but just noticed when looking over your code..