Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
You are drawing too much current through the 5V pin of the Arduino, this is causing the regulator to overheat and when you operate a relay, the 5V drops and resets the controller.
Note that you only can draw <=100mA from (any pin of) an Uno when the Uno is powered with 12volt.
If the power for the FlexibleNumericDisplay and/or relay is coming from the 5volt pin, then that could be the problem.
The 5volt regulator on the Uno will overheat and shut down (or release the magic smoke).
Try powering the Uno with a 5volt cellphone charger, connected to the USB socket.
Leo..
Wawa:
Note that you only can draw <=100mA from (any pin of) an Uno when the Uno is powered with 12volt.
If the power for the FlexibleNumericDisplay and/or relay is coming from the 5volt pin, then that could be the problem.
The 5volt regulator on the Uno will overheat and shut down (or release the magic smoke).
Try powering the Uno with a 5volt cellphone charger, connected to the USB socket.
Leo..
How can I know that Arduino can be draw <=100mA when the Uno is powered with 12volt?
Is it calculated value? then, How can I calculate?