-->
Page 1 of 3

How can I check the ESP type with code?

PostPosted: Sat Jun 06, 2020 3:37 pm
by GHBLoos
I have created some Hue lights using a ESP-01 and ESP-12. These lights are configurable using a webpage on the ESP webserver. But the ESP-01 version has less functions (no hardware switch). So I would like to disable this option on the webpage. Therefore I should first check if the code is running on a ESP-01.

Does anyone has an example how to check if the code is running on an ESP-01?

Re: How can I check the ESP type with code?

PostPosted: Mon Jun 08, 2020 9:18 am
by QuickFix
You can't; the ESP-01 and ESP-12 are exactly identical (from a hard/software point of view), there are only less external pins available on the PCB, but they both use the same ESP chip.

The only thing I can think of is, in hardware, pull one (or a few) of the non-existing pins on an ESP-01 high or low on an ESP-12 and check for that state at startup.

Re: How can I check the ESP type with code?

PostPosted: Mon Jun 08, 2020 11:44 am
by GHBLoos
Thanks. Not the answer I was hoping for. I have to find a workaround.

Re: How can I check the ESP type with code?

PostPosted: Sat Jul 11, 2020 2:08 pm
by NickD
I'd be tempted to write some sort of ID into "EEPROM" of the ESP's to be used and get the code to check that.