rodolfovieira:
Sorry, but I think you do not understand what I said.The code is all working beautifully.
(snip)
Do you understand now? (snip)
No, I don't. If it is working beautifully, why are we having this dialog?
You also did not understand what I said. You cannot use digital pin 4 for anything but the SD SPI bus Slave Select. Do you have a microSD card in the slot yet? When you do, if not already, this will cause problems.