There are several methods to generate a de Bruijn sequence. Is there a general algorithm to create all unique (rotations are counted as the same) De Bruijn sequences for a binary alphabet of length $n$, or $B(2, n)$?
For example, one such sequence for $B(2, 5)$ is $00000111011010111110011000101001$.
For small $n$, a depth-first search using a list or set of "already seen" subsequences does the trick.
Edit: Here is the code I wrote in 2015-2016 (I would write it differently now). It included one of my "clever tricks" where since the lexicographically first string of a particular cyclic sequence starts with $n$ zeros, if there are equal counts of zeros and ones, then all substrings (including the wraparound ones) are included, obviating the need for string rotations.