This Library gets the Unique ID / Manufacture Serial Number from the Atmel AVR, SAM, SAMD, STM32, and ESP Microcontroller.
ArduinoUniqueID supports the Microcontrollers.
- Atmel AVR -
Not Unique Disclaimer
- Atmel SAM ARM
- Atmel SAMD ARM
- STM32
- Espressif ESP
- Teensy
- Raspberry Pi Pico - RP2040
- Install the library by Using the Library Manager
- OR by Importing the .zip library using either the master or one of the releases ZIP files.
The library comes with examples. After installing the library you need to restart the Arduino IDE before they can be found under File > Examples > ArduinoUniqueID.
#include <ArduinoUniqueID.h>
UniqueID has UniqueIDsize bytes array of the Unique Serial ID.
for(size_t i = 0; i < UniqueIDsize; i++)
Serial.println(UniqueID[i], HEX);
Print the hexadecimal bytes of the Unique Serial ID on the Stream.
void UniqueIDdump(Stream);
UniqueID8 has the last 8 bytes array of the Unique Serial ID.
for(size_t i = 0; i < 8; i++)
Serial.println(UniqueID8[i], HEX);
Print the last eight hexadecimal bytes of the Unique Serial ID on the Stream.
void UniqueID8dump(Stream);
Do you like this library? Please star this project on GitHub!