Mega 2560 microcontroller

Hi,

New to Arduino and relatively new to coding. Got my first kit today and I've gone through a few different beginner projects and all with the same outcome. I have been copying codes and schematics from the Arduino website just to see them working but when I try to operate them there is no response. I have plenty of experience wiring and reading schimatics so I'm confident that's not the issue. When I compile the codes and upload them everything seems fine, but the hardware doesn't do anything. The led will illuminate once the code is uploaded but that is all.

Any advice would be appreciated, thanks.

I can only guess without knowing what you did. Can you upload the Blink sketch?

A lot of programs will output to the serial monitor. Do you open the serial monitor after the program upload? Is the baud rate in serial monitor correct?

The blink is pre-loaded onto the board and runs as soon as it's turned on I think.

Yes but your were asked if you could upload it.

The blink sketch is a known working sketch, so if you try to upload it again, and it suceeds you know the upload process is working.

To be sure its the newly uploaded program that it working change the delays in the flash and see the effect ...............

1 Like

Change the blink example to use a different timing; upload and see if the result is as expected. Example provided for convenience

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(2500);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(500);                       // wait for a second
}
1 Like

Thanks guys, I'll give this a go and see how things are.

ok so i have updated the timing and the led still seems to be blinking at the same rate as the original sketch. Does this mean the board isn't recognising the code that i am sending ?

What is the does the IDE report in the Window below the code ?

ok i've just realised that in the tools tab the incorrect board was selected. Everything is working as it should now. I guess i really am a beginner.

You should pay attention to what is displayed in the output window; note that this is a scrollable window, place your cursor in it and you can scroll through all text). As well as in the right bottom of the IDE Window.

:smiley:

1 Like

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