I have an ESP32 and I have connected an SD card module to it. I have several Arduino bin files on my SD card, like firmware1.bin, firmware2.bin, etc.
What I want to do is, by pressing a button, flash a specific bin file from the SD card onto the ESP32. For example, if I press Button 1, I want the firmware1.bin file from the SD card to be flashed onto the ESP32. Similarly, if I press Button 2, I want the firmware2.bin file to be flashed.
I want to set this up so that when one firmware is flashed, the current firmware on the ESP32 is erased and the new firmware replaces it.
What I need to know:
-
How do I write the Arduino code required to select a specific bin file from the SD card based on a button press and flash it onto the ESP32?
-
Is using flash partitions mandatory for this? Or is there another way to do it?
-
Can you provide a code example showing how to recognize the name of a specific bin file through the SD card module I'm using and flash it?
I need your help to get this working correctly. Thank you!
Hardware being used:
-
ESP32 module (The specific name of the module you are using)
-
SD Card module (The specific name of the module you are using)
-
Button (How many buttons are you using?)
Posting your question in this way will make it easy for anyone to understand exactly what you need to achieve.