Odd rx effect

Not sure what else to call it. I have looked for an answer to this but not sure what to call it so I've decided to post here. I am running the Blink script on my ATMEGA328 board. Uploaded fine. The wierd thing is after about a minute - the rx light (recieve) light starts flashing and the board reboots.

I have the led in 13 and ground and the led is flashing - but stops flashing when the rx is flashing. It still seems to happen when the arduino and processing programmes are close... just incase you ask.

Not a big issue atm - just wierd.

Please advise - cheers, Colin.

Hi also now on the button blink led script. I press the button a few times and the rx starts flashing...

Script below:

/* Blink LED when the button is pressed


*/
int ledPin = 13; // choose the pin for the LED
int inPin = 7; // choose the input pin
// (for a pushbutton)
int val = 0; // variable for reading the pin status
void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inPin, INPUT); // declare pushbutton as input
}
void loop(){
val = digitalRead(inPin); // read input value
// check if the input is HIGH (button released)
if (val == HIGH) {
digitalWrite(ledPin, LOW); // turn LED OFF
} else {
// blink the LED and go OFF
digitalWrite(ledPin, HIGH);
delay(200);
}
}

I can only press the button for about 10 seconds...

Do you have any resistor in series with the LED, and is the LED really bright?

If so, you are probably exceeding the current rating of your board and are causing it to reset due to overheating.

Try a 220 ohm resistor (for starters) in series with your LED.