2 of 2 people found this helpful
You haven't given much to go on. Perhaps you should tell us more:
- What problem are you trying to solve?
- Which Arduino are you using? What devices do you have connected to it and how are they connected and powered?
- What libraries are you using and what version of IDE are you using?
- What is your sketch (program) look like?
- How did you determine it has "hung"? What have you tried to do to solve the problem?
Arduino boards are mostly microcontroller based, and generally don't "hang" unless you have some sort of flaw in your program logic of sorts or have perhaps misconfigured the chip in some way (on purpose, or accidentally), although power problems (noisy power, insufficient voltage) could indeed cause the microcontroller to malfunction or hang, hence why having more information is necessary.
i am trying to run an fan depending on the temperature from a sensor using PID...
Using arduino mega...
Libraries using are pidcontroller and dht..version of ide is 1.8.8
it is hanging when i am using UART without that it is running fine...i was checking with serial monitorby that i found it is being stopped after certain time..