Fix my “freezing” arduino code.

Job ID: 34248464

Budget: $10 – $30 USD

I’ve had some code written recently for an Arduino UNO R3 that has two inputs. A dry contact and a ultrasonic range sensor.
The issue I’m having is that if left alone for several hours it seems to freeze and not work until we have rebooted it using a power cycle.
Any ideas on how to prevent this malfunctioning?
I can’t share the file with everyone here but will obviously share this with those that have shown they have a lot of experience in Arduino UNO R3 programming.
It would be beneficial to know if you have a solid idea as to what may be happening instead of a “Let’s try this or let’s try that” hoping that something will solve the issue.
Related categories: Electronics Microcontroller Arduino