I built a low-cost gyroscope using a slotted optical switch, paper that I printed different bands of gray and black, Lego and gravity. I saw a slotted optical switch used for a tachometer, so I expanded on that idea. It's only 2 dimensional and needs dampening, but you get what you pay for.