BMS Doug wrote:If you fit a magnet to the edge of the turntable you could have one reed switch at each of the locations so your Pi will be able to know the turntable is whenever it turns on (or turns) and have precise alignment.
An optical scheme that just had one reader and marks on the turn table that defined specific positions, I think, should be simpler. Maybe design those marks and print them on a laser printer, cut out and glue around the turntable. In software, adjust for any difference between where the start is on the printed paper and the actual start should be with regards to the turntable matching with the required railroad tracks.
If your optical reader can read more than binary true/false, I mean can read levels of light being reflected from the paper, essentially telling you the width of the line, you could have data like this: - - - - - | which might let you concisely state where on the circle you were and exactly where your next correct stop point is, well, plus or minus the software defined offset. So you can get this from both directions, perhaps the data is duplicated before and after the stop line: - - - - - | - - - - -