datalogging without computer

In the middle of your code there are some spurious black dots. Please repost your code between code tags as per the instructions so it doesn't get munged by the forum software.

I agree with the suspicious others, as there is a rule that the problem nearly always is where the user thinks it isn't.