So I have this one small Arduino task for perform in a project at work & I've received som rudimentary instructions but the task is simple & I'm pretty sure I can do it...
-
@jwcph I am not an expert in anything to do with this kind of thing so there may be much better ways to do this but I tend to save a new version of the code (with something like 001, 002, 003 etc at the end) in the Arduino IDE each time I upload to the board so I know I haven't lost what I was doing
Once I'm done I zip everything but the last one
I don't think that there's any way to keep history in the Arduino IDE so this is the best option I've found
@fastness @jwcph or you can check the code into git and rollback that way
If the "this" in "never done this before" means coding in general and not just never coding an Arduino.. then probably there is a lot to learn and it can be a bit much at first
Don't worry too much about doing things "right" - just do what you can and learn as you go.
Copying files to numbered versions work fine to start with - a certain amount of pragmatism is needed to tolerate the learning process.
-
@fastness @jwcph or you can check the code into git and rollback that way
If the "this" in "never done this before" means coding in general and not just never coding an Arduino.. then probably there is a lot to learn and it can be a bit much at first
Don't worry too much about doing things "right" - just do what you can and learn as you go.
Copying files to numbered versions work fine to start with - a certain amount of pragmatism is needed to tolerate the learning process.
-
@jwcph I am not an expert in anything to do with this kind of thing so there may be much better ways to do this but I tend to save a new version of the code (with something like 001, 002, 003 etc at the end) in the Arduino IDE each time I upload to the board so I know I haven't lost what I was doing
Once I'm done I zip everything but the last one
I don't think that there's any way to keep history in the Arduino IDE so this is the best option I've found
@fastness I know, this much I found out - but it does nothing to save the code already running on the device, or enable me to roll back to it if I messed up...
-
-
-
-
-
@fastness I know, this much I found out - but it does nothing to save the code already running on the device, or enable me to roll back to it if I messed up...
@jwcph
I've been playing with Arduino/esp32 a little bit, but I've never heard of a way to get the binary code off a device. Might exist, but also might not, it's not a common use case.Depending on circumstances, can you put your code on a replica device that you switch in when you've got it doing what you want?
-
@jwcph
I've been playing with Arduino/esp32 a little bit, but I've never heard of a way to get the binary code off a device. Might exist, but also might not, it's not a common use case.Depending on circumstances, can you put your code on a replica device that you switch in when you've got it doing what you want?
@niels @fastness No, I can't do that - I only have one device

I want to challenge the "not a common use case" thing, though, because OF COURSE it is!
Literally every single user, ever, would benefit, if only just from knowing that the option existed to back up & later restore previous work before overwriting it.
-
@niels @fastness No, I can't do that - I only have one device

I want to challenge the "not a common use case" thing, though, because OF COURSE it is!
Literally every single user, ever, would benefit, if only just from knowing that the option existed to back up & later restore previous work before overwriting it.
-
@niels @fastness I would contend that not a single person writing text in the entire world would prefer NOT to have the "undo" option.
You say you don't like doing it - but you can't; the option isn't there. I don't know you, but I honestly doubt that if the option did exist, you wouldn't benefit from it at all. If so, then you're probably pretty unique
It's like, I like seat belts in cars, too, even though I've thankfully never had my life saved by one.
-
@niels @fastness I would contend that not a single person writing text in the entire world would prefer NOT to have the "undo" option.
You say you don't like doing it - but you can't; the option isn't there. I don't know you, but I honestly doubt that if the option did exist, you wouldn't benefit from it at all. If so, then you're probably pretty unique
It's like, I like seat belts in cars, too, even though I've thankfully never had my life saved by one.
@jwcph
I feel very unique
Anyways, it seems like there are a few tools available, maybe they can work for you?
https://gra-afch.com/how-it-works/how-to-download-the-flash-memory-contents-sketch-from-an-arduino/
https://www.evilmadscientist.com/2011/avr-basics-reading-and-writing-flash-contents/
https://www.megunolink.com/documentation/program-device/download-arduino-program-eeprom/
@fastness -
@jwcph
I feel very unique
Anyways, it seems like there are a few tools available, maybe they can work for you?
https://gra-afch.com/how-it-works/how-to-download-the-flash-memory-contents-sketch-from-an-arduino/
https://www.evilmadscientist.com/2011/avr-basics-reading-and-writing-flash-contents/
https://www.megunolink.com/documentation/program-device/download-arduino-program-eeprom/
@fastness@niels @fastness If I was doing this for my own sake, because I wanted to learn Arduino (which I might, at some point), I think those could be helpful, thanks

For this project, however, they're way "over budget" - I can easily see myself spending 1-2 days finding out & understanding how even one of these approaches work...
I guess I'll just have to gather up my courage & overwrite it



