Add ESP.getChipId() function to get ESP32's ChipID. (#322)

* Add ESP.getChipId() function to get ESP32's ChipID.

* change getChipId() to getEfuseMac()
This commit is contained in:
WEMOS Electronics
2017-05-05 01:59:54 -05:00
committed by Me No Dev
parent cc73f17add
commit a38ffe58fe
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,14 @@
uint64_t chipid;
void setup() {
Serial.begin(115200);
}
void loop() {
chipid=ESP.getEfuseMac();//The chip ID is essentially its MAC address(length: 6 bytes).
Serial.printf("ESP32 Chip ID = %04X",(uint16_t)(chipid>>32));//print High 2 bytes
Serial.printf("%08X\n",(uint32_t)chipid);//print Low 4bytes.
delay(3000);
}