It should be ok.

Why don't you post your code here?

you may be having a change on pins somewhere and that may be causing the problem.

Since you say it works sometime, most likely you have an issue with your code if not with hardware.


---------------------------