Checking code on an arduino

How do I see if code has been uploaded to my arduino, and if so, is there any way to see what code is on there (i am using arudino uno rev 3) thank you very much1

You load the code for it to do something. Right?

So make sure it's doing what it's supposed to.

Or use the LED on pin 13, (built-in Led), to monitor the operation of your code.

If You use the IDE, just watch the report shown.

To see that the download worked, use some code blinking the omboard LED on pin 13.

The second part of your question seem to relate at seeing what code is already written to an existing programmed Arduino, so no.

One keeps a copy of any sketch and must remember which Arduino it is written on.

Use can use avrdude to read the flash memory in the UNO, but it will be the machine code output produced by the compiler, not the original sketch.

The IDE reports if the code is successfully uploaded, and exactly how much memory it occupies. IDE version 1.8.19:

The serial monitor is an invaluable tool. My setup() usually begins

void setup() {
  Serial.begin(115200);
  Serial.println("Jello Whirled!\n");


One could put something more useful there, like the name of the sketch. There are some predefined macros for the date and file name that would make printing that information easy.

Then when you reset the board, it tells you what's on there. Useless, of course, for stuff you loaded up before doing anything like this.

I'm too lazy to use the macros or go to much more trouble as easy as it would be, and it costs me. :expressionless:

a7

I'm using similar code, but only one of the leds (two arduinos, each corresponding to the motor) on one arduino is flashing, so I'm just wondering how this could vary with one working and one not.

But we can't see your code or how your Arduinos are wired.

Add two lines to give non-blocking blink of LED_BUILTIN "heartbeat":

void setup() {  
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, (millis() / 1000) % 2);
}

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