Elegoo MEGA2560 R3 Reset button?

Hi all, I have just bought my Elegoo 2560 Mega Most Complete Starter Kit today, I got up to tutorial 5 (digital switching) and have found something a little strange.

Initially I couldn't get the program to work, I made quadruple certain it wasn't my wiring and gave up, I also changed the program so both switches should equal on, nothing. So I gave up, unplugged it... half an hour later I wouldn't be beat, plugged it in, and suddenly it works. So I then put the original program on again and it doesn't work.

The odd trick that I'm finding is that I have to hit the reset button a number of times before the board seems to run the program, does this sound right?

If I hit reset once, 'L' turns off, program doesn't work.

If I hit reset again, 'L' stays on, program doesn't work.

If I hit reset again, but 1 to 5 times in a row, 'L' flashes once, then stays on, and the program works.

Can anyone tell me what is happenening, or should be happening here?

Please post your code and a sketch of your wiring diagram.

Can you load the basic blink example program the the board and have it run?

Hi Cattledog,

The program now works absolutely fine and is exactly as the example, and breadboard is also exactly as example.

The issue I has is that in order to get the program to run there seems to be an illogical sequence with the reset button I have to press.

Please see video - - YouTube

The red led on the cpu is following the state of operation. press & HOLD reset until the red led blinks and seeif that isn't more consistent. A cpu board takes a few seconds to restart.

Please post the code you are running. It's not clear to me why the L led is on. Does the L led blink rapidly when code is loading.

What ever is going on with the reset button and the L led does not look normal to me.

Is there a reset pin on the header, or just the reset button?

There are 2x leds next to the 'L' led that blink when uploading a code, whether that is relevant or not I don't know...

Code being used is



//www.elegoo.com
//2016.12.08

int ledPin = 5;
int buttonApin = 9;
int buttonBpin = 8;

byte leds = 0;

void setup() 
{
  pinMode(ledPin, OUTPUT);
  pinMode(buttonApin, INPUT_PULLUP);  
  pinMode(buttonBpin, INPUT_PULLUP);  
}

void loop() 
{
  if (digitalRead(buttonApin) == LOW)
  {
    digitalWrite(ledPin, HIGH);
  }
  if (digitalRead(buttonBpin) == LOW)
  {
    digitalWrite(ledPin, LOW);
  }
}

Those are the Rx and Tx indicator leds which are blinking with the serial loading of the code. Normal. These leds should not blink with the reset button, only with the Serial loading of code.

Try this modification the setup which should leave the L led off.

void setup() 
{
  pinMode(ledPin, OUTPUT);
  pinMode(buttonApin, INPUT_PULLUP);  
  pinMode(buttonBpin, INPUT_PULLUP); 
  
  pinMode(13,OUTPUT);
  digitalWrite(13,LOW); 
  
}

What pattern do you see on the L led when you press reset? Is it any different if you place a jumper in the reset header and connect to ground and then remove?

What do you see with reset if you remove the external circuitry and run your code?

Does it reset reliably with the reset button press and release. I think that the L led should light up when the reset button is pressed, flash quickly when released and the bootloader runs, and then blink once before the code turns it off.

The behaviour of your Mega with reset is not normal. The code should not be hanging.

I've shared this information with Elegoo support and they seem to think there is an issue with the board. Replacement on its way :slight_smile:

Glad this showed up while googling, confirms my Elegoo Mega 2560 is also broken and there's no point in trying to troubleshoot anymore. Unfortunately, mine is 3 years old and so unlikely to be within warranty.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.