The Arduino blog has a great piece about Knitic, a project involving a custom shield for an Arduino Due; these plug into a knitting machine’s solenoids and sensors, allowing Arduino control of your machine.
Knitic is an open source knitting machine, which controls a Brother electronic knitting machine via Arduino. The old ‘brain’ or control panel has been removed and replaced by Arduino, which allows us direct and immediate control over the needles. With it, one can knit as long a pattern as desired, as well as modify the pattern on the fly. Why are we developing Knitic? Because we feel the knitting machine, as the first domestic fabrication tool, has been totally overlooked in the age of digital fabrication.