Printing the Unique ID

How to print out the unique ID?

#include <ArduinoUniqueID.h>

void setup(){
  while (!SerialUSB);

void loop(){

Source: GitHub - ricaun/ArduinoUniqueID: Arduino Library to gets the Manufacture Serial Number from the Atmel AVR, SAM, SAMD, STM32, and ESP Microcontroller.

The library is not for the RP2040

Ah yes, the M0+
You may have to write your own from a library for another device. Search for cortex M0+ unique ID and you'll find more info.
Someone else may know but I do not believe this feature has been ported to this chip yet for Arduino.

I was needing something like this, a quick fix for me was to read and use the MAC address from the WiFi module - hopefully it's unique, though not guaranteed. If you don't want it to look like a MAC address, convert to dec.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.