In late high school, I decided to disassemble my old toy R2-D2 with the intent of making an even better robot. That robot is still a work in progress, and I’ve learned a lot since then. In the meantime, I have at least figured out how to control the planetary gear system that allows the dome to rotate. It utilizes a quadrature encoder incorporating two pairs of infrared blasters and sensors.

Arduino sketch is available here.