I've only done a very little animation and rigging before, and I keep getting stuck trying to rig the pistons and rotor of the Stirling engine I built.
What should happen is that one piston moves in as the other moves out, and through the attached arms, the rotor should spin. Animating the rotor and the piston heads was easy enough, but getting the arms that go from the piston heads to the end of the shaft arm to move right endlessly confuses me.
Each end of each arm moves differently over the course of a cycle. With animating, I can't figure out how to interpolate so the arms stay where they should.
With armatures, I have tried for a while, but keep getting stuck when it comes to how to have one end of a bone moving in a circle while the other end is moving in a straight line.
Edit: The answer below elegantly resolved my problem, so i've updated this with the finished .blend file in case it's useful someone else.
Here is the .blend file: