Or you could just create a 9-bit 512 entry code, then short-circuit it to 360 entries. Any even length gray code can be trivially created, as long as you create the next-larger full 2^n entry code first.
Main Topics
Browse All TopicsA quote from Wikipedia (http://en.wikipedia.org/w
"a single-track gray code has been constructed that has exactly 360 angular positions, using only 9 sensors"
I've searched, but have not found this particular code. The ones I found required 12 sensors. Can anyone provide a source for the encoding that Wikipedia refers to?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The paper's here: http://www.hpl.hp.com/tech
Beyond my understanding. What I did read of single track gray codes seems to be satisfied by your suggestion NovaDenizen - only a single bit changes between each position and the block is cyclic.
I was looking at an algorithm to produce such a cycle, but your's is much simpler to explain and to reproduce.
Why is this not a single track code?
NovaDenizen, the PDF you linked to is one that I had found--its appendix gives info for 12-bit and 15-bit encodings, but not for a 9-bit.
RobinD, a single-track gray code requires each 'column' of bits to be the same, just shifted, so that a rotary encoder only needs one 'track' of zeroes and ones, and the sensors can be spaced evenly around its circumference. A regular gray code requires one track per bit, because the columns are not shifted copies of each other.
Check out this paper: http://www.cs.technion.ac.
It is one of the Key references in the Hiltgen and Patterson paper.
Look at the Appendix on page 788 and the Length 9 Table.
If you string these 56 9-bit Necklaces together, you will get 504 position single-track gray code.
A 360 position code will require 40 of the 9-Bit Necklaces.
You have to maintain the 1-bit change between Necklaces.
For example, you can go from Code_01 [0 0000 0001] to Code_10 [0 0010 0001]
to generate a 48 x 9 = 432 position code.
I'm pretty sure you can make further reductions.
Based on d-glitch's input, I constructed the following single-track gray code for encoding angle in degrees, with nine sensors spaced 40 degrees apart.
00110000000000000000001111
Business Accounts
Answer for Membership
by: NovaDenizenPosted on 2008-07-25 at 07:58:28ID: 22089155
It's not hard to create a 60-position gray code using 6 bits, and a 6-position gray code using 3 bits. So just use the two together and you will have a 360-position code using 9 bits.
Here's how you can recursively construct a 2^n size n-bit gray code.
start with a trivial 2^1 entry 1-bit gray code, and transform it to a 2^2 entry 2-bit gray code.
0
1
Now take all the entries in the code and put them on a line, adding a 0 before each entry
00 01
Copy the line, except transforming each leading 0 to a 1.
00 01
10 11
Now, if you follow these codes clockwise, you have a 2-bit gray code.
00
01
11
10
Turn this into a 3-bit 8-entry gray code.
000 001 011 010
100 101 111 110
If you make a clockwise path around these codes, you get a sequence of 8 gray codes. But you can 'short-circuit' this and make a sequence of 6 gray codes.
000 001 011
100 101 111
If you keep extending the full 3-bit 8-entry gray code to a 6-bit 64-entry code, you can shorten it in the same way to make a 6-bit 60-entry code.
Then, just repeat the 60-entry code 6 times around the 'platter' or whatever you're using. Use the 6-entry code to distinguish each of these 60-entry segments. Now you have 360 positions using 9 bits.