Martin O’Hanlon is currently building a robot and he wants it to autonomously drive in a straight line. This isn’t as easy as it sounds but he’s hit on a solution – use encoder discs on his motors and count the number of ‘clicks’. He explains more on his blog and he’s published the code to do it.