I like the idea of a psuedo random several byte long identifier. Means we really need some sort of setup sketch… but why do people need unique ID again anyways?
Off of the top of my head, I can think of a few ideas…
I was thinking of making a Tomogachi or Digimon-type ‘game’ eventually where you are given a creature at random. I’d love it if I had a seed to lock each Arduboy to a specific range of creatures. In the original Pokémon games, you were only able to catch certain monsters on different versions of the game. This could kinda simulate something like that. I can also think of multiplayer games being able to remember who they’re talking to, too.
It would have been interesting if every chip had a unique code imbedded in it.
But most of what is needed here can be done in software. Repeated calls to micros() if done at random times - triggered by keypresses - can build up a random number sufficient for most purposes. It would certainly be enough to distinguish between two Arduboys that have somehow managed to establish communication. And if you need that value for later? Stash it in EEPROM.
Exactly how you’d do it with a setup routine.
Resurrecting this topic just to announce that, as of version 3.1.0 of the Arduboy2 library, functions writeUnitID() and readUnitID() are available to set and retrieve a 16 bit value that can be used to uniquely identify units. An example sketch, SetNameAndID, is included to allow setting the ID. Some coordination would be necessary to make sure the IDs are unique for a situation that required it.
Related functions writeUnitName() and readUnitName() are also available for setting an up to 6 character unit name.