Chat freely about anything...

User avatar
By btidey
#87855 2 thoughts.

If you check the flash size in your start up code (ESP.getFlashChipSize()) that should show as 4MByte on ESP-12 modules but I think most ESP-01 only have 1MByte.

If you can spare a pin on the esp-12 variant then you could wire that to 0V. Setting it to Input with internal pull up should then allow you to see that as a 0 on the ESP12 but not on the esp-01
User avatar
By pangolin
#87867 ESP-01 has usually 512k, ESP-01S has 1MB but checking "less than 4MB" would work for now... beware though, esp8285 (e.g. wemos d1 mini lite) has same external pins as 4MB, but also only 1MB...

Depending on how many you have, ypou could "hard-code" the (amost) unique chip id of the ESP-01 and sat "if chipid != "aabbcc" (or whatever) then do stuff with button"

Finally you CAN have a button on the ESP-01 if you don't need t serial by using either GPIO 1 or 3 (TX / RX)...I do. :)
User avatar
By GHBLoos
#87874 It's a good idea to check the memory size and based upon that resukt store the ESP type in flash memory with a second variable 'setup=initial_Setup'. If, after reset, the code works fine, it could be set to 'setup=definitive_setup'. If the code fails, change the ESP type and store that in flash memory.
User avatar
By Lea
#87894 I solved a similar configuration problem by using the MAC address as an index into a JSON file kept in the onboard file system. The code is the same for each device, just have to add each new device to the file and upload it Over The Air.