Arduino curcuit keeps freezing

That's too bad.

We might be able to help if you were to post your code. Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Without seeing the code all we can do is guess and I am not in the mood to waste my time guessing.

Also, please post a schematic of the circuit. Hand drawn, photographed and posted is fine.