I got my first IoT board, the Arduino Nano ESP32. I loved it.
I am new to IoT world as well as C++.
Since I don't know how to code, I make small changes and upload to board frequently. I read somewhere that flash memory wear out after certain writes. Since Nano ESP32 is very coslty, I wish it could last for long.
My question are:
How many times we can upload sketches to an Arduino Nano ESP32 board?
What issues shall I face after crossing this limit?
How to minimize uploads like testing my code in another way?
Assuming I don't know anything about hardware and programming, can anyone clear my doubts in a simple way and give some suggestions?
The flash memory of an ESP32 typically has a write endurance in between 10,000 to 100,000 write cycles per sector, depending on the specific model and the quality of the flash chip.
Each time you upload code, the flash memory is erased and rewritten. The wearing out primarily affects the sectors being rewritten, not the entire flash memory but the ESP32 uses a defined memory layout, where the bootloader, partition table, and application are written to fixed addresses in the flash memory.
So the more you use it the more it wears out but it's likely going to be years before you start seeing issues.
Just use it and don't worry about it. (and there are some that are not so costly).
If this is just about learning, you can also use wokwi with a virtual ESP32 if you want to practice or test some code.
I agree but this is about a Nano ESP32; I would not call Arduino products cheap and they're supposed to have QA
I used to work for an independent testhouse where components (from e.g. Motorola) were tested before the manufacturer of the final product (e.g. ABS boards in the car industry) placed them on their PCBs. It saved the manufacturer money because debugging a PCB with a faulty component did cost more.
I do not know if Arduino follows that path or that they just pray
If you can only do this 10000 times you can upload a new sketch each day for the next 27 years. And if it is 100000 times you can continue doing it even longer
With other words, you don't have to worry about it at all.
There was a time we would make a bit more efforts to proof read the code and manually follow the computational path to ensure all was right before hitting compile as compiling was an expensive a long tasks (sometimes once a night in a batch process).
But yes nowadays I hit compile and upload again because I had a small spelling mistake in a debug print that would not even make it to the final code.
Relax. Just use the mark, top left, to compile without uploading.
As far as the number of upload times is concerned, you will be much older before that becomes a problem.
Grab a decent text on the subject. (I started with "Bruce Eckel - Using C++" ISBN : 0-07-881522-3) and start from "hello world".
Just be grateful that, with Arduino, you get no closer to the serial port than "Serial.do()". There was once a time when you had to design/create the whole "Serial" class from hardware up
Thanks for the advice. Now my first priorty is to write and upload programs rather than caring about number of uploads .
(I purchased a general ESP32 development board and do frequent uploads in it while learning or debugging.)