Keeping track of what has been uploaded

Post Reply
SealionSteve
Posts: 22
Joined: Fri Mar 12, 2021 7:38 am

Keeping track of what has been uploaded

Post by SealionSteve »

Hi

I am fairly new to Arduinos but used to work in (old-school mainframe) system development before I retired, so I am reasonably happy to experiment 😁

Having started a few projects, I found it a bit confusing the first few times I hooked up any of my Arduinos to the PC - I kind of assumed that the code showing in the IDE was what was sitting inside the Arduino (cue a Homer Simpson "Doh!"). Of course, it's just whatever you had in the IDE the last time you used it.

The lesson is that you need to be very methodical about naming your folders and files on the PC to keep track of exactly what you have uploaded, especially with multiple Arduinos in use.

One useful suggestion I have discovered by googling is to have a standard chunk of code in every setup() which sends the uploaded file's name and timestamp of the compilation to the serial monitor.

Serial.println(__FILE__);
Serial.println(__DATE__);
Serial.println(__TIME__);

You can add anything else you find useful too, of course, e.g. why that upload was done. It does take a bit of discipline, but is very useful. You can edit the BareMinimum file to include the file info (you may have to mess around with permissions to do this).

Does anyone have any similar tips for keeping track? The ultimate would be an enhancement to the IDE or a USB "black box" which decoded what was on the Arduino and loaded it into the IDE as readable code. I imagine that is probably a non-starter though, for all kinds of reasons!

Steve
Lincs, UK
Bobfilipiak
Posts: 4
Joined: Sat Mar 06, 2021 11:03 am

Re: Keeping track of what has been uploaded

Post by Bobfilipiak »

Good idea. I would put the serial.println() code in my loop() because the serial monitor can scroll by rather fast depending on the amount of time you use in delay() functions.
Bob Newport News, VA
NonnyM
Posts: 4
Joined: Sat Mar 13, 2021 9:00 pm

Re: Keeping track of what has been uploaded

Post by NonnyM »

I suppose you could write a stop in the ide code to rest whilst you read the serial output.

If you have the serial monitor open you could press the “ Any Key” to continue the code. ;-)

Rgds
Post Reply