In preparation for some hacking on the Student Robotics motor feedback, I’ve written a script for generating PDFs containing rotary encoder patterns. I wrote a utility that used cairo in C a while back. I thought I’d try out pycairo. It was pretty much the same experience. I’ve put it up on gitorious. Run it like this:
% git clone git://gitorious.org/rotenc/rotenc.git % cd rotenc % ./rotenc Usage: rotenc INNER_DIAMETER OUTER_DIAMETER N_SEG OUT_FILE Where: INNER_DIAMETER is the diameter of the inner circle in millimetres. OUTER_DIAMETER is the diameter of the outer circle in millimetres. N_SEG is the number of segments to draw OUT_FILE is the name of the pdf file to write to. % ./rotenc 50 60 16 encoder.pdf %
Update:I thought I’d experiment with Thingiverse, and upload it there.
2 responses to “Rotary encoder pattern generator”
Site by Rob Gilton. © 2008 - 2019