Dropbox for knitting machines
Knitty2 manages your knitting machine patterns. Patterns can be both uploaded and downloaded to/from the machine.
- Reads or writes BMP, PNG, and JPEG images.
- Compacts the memory used to avoid gaps (fragmentation!) in memory, allowing you to use (almost) 100% of your machine's 32 kb memory.
- Adding data to the memo display.
- Validating that the pattern fits within the machine's working memory.
Only tested on macOS, but should work out of the box on both Windows and Linux given that you have the software requirements listed below installed. Please let me know if it does not - preferably with a pull request fixing the issue :-)
Hardware:
- Brother KH940 knitting machine. KH930 might work but is untested.
- USB FTDI cable connected to the machine.
Software:
- Rust compiler (https://rustup.rs)
Clone this repository, build it, and run it with the standard Rust toolchain:
$ git clone [email protected]:mhallin/knitty2.git
$ cargo run
# First, find your USB cable:
ls /dev/tty.usbserial-*
# This will use "patterns.bin" as the floppy drive image. It will
# be created if it does not exist.
cargo run -- emulate /dev/tty.usbserial-A7XTW5YZ patterns.bin
If this is the first time you run knitty2, you should download all patterns from
the machine first. On a KH940, this is done by entering CE
, 552
,
STEP
, 1
, STEP
. When this is done, the machine should beep (as it
always does). Quit Knitty2 by pressing Control-C. Now, you need to unpack the
disk image into a folder.
# Export files from the floppy drive into a folder called patterns
cargo run -- export patterns.bin patterns
Now you can modify/add/remove patterns as much as you like. Just drop them in the folder together with the other patterns.
When you're done with fiddling with the images, you should upload them:
# Import the files from a folder into a floppy disk image
cargo run -- import patterns.bin patterns
# Connect the USB-FTDI cable and emulate the floppy drive
cargo run -- emulate /dev/tty.usbserial-A7XTW5YZ patterns.bin
To load the patterns on the machine, enter CE
, 551
, STEP
, 1
,
STEP
and wait until it beeps.
- The file format/memory dump file format documentation over at STG's knittington repository was a huge help in writing the parser/serializer.
- Steve Conklin's PDDemulate.py in knitting_machine was very useful in filling the gaps in Tandy's official floppy drive command documentation.