mirror of
				https://github.com/0xFEEDC0DE64/arduino-esp32.git
				synced 2025-10-26 19:51:44 +01:00 
			
		
		
		
	* ESP.getChipModel() returns model of the chip * ESP.getChipCores() returns the core count. * Example gives chip model, revision and core count. * Read efuse for chipmodel Co-authored-by: Martijn Scheepers <ms@SDNengineering.nl>
		
			
				
	
	
		
			18 lines
		
	
	
		
			485 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			485 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| 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.
 | |
| 
 | |
| 	Serial.printf("ESP32 Chip model = %s Rev %d\n", ESP.getChipModel(), ESP.getChipRevision());
 | |
| 	Serial.printf("This chip has %d cores\n", ESP.getChipCores());
 | |
| 
 | |
| 	delay(3000);
 | |
| 
 | |
| }
 |