Skip to main content

Dropbox for knitting machines


Knitty-gritty manages your knitting machine patterns. You place all your pattern images a folder, and this folder will be uploaded to the machine each time you tell the machine to import patterns. You can of course pre-populate the folder with patterns downloaded from the machine.

Features

  • 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.

What Doesn’t Work?

  • Adding data to the memo display.

  • Validating that the pattern fits within the machine’s working memory.

Platform Support

Only tested on OS X, 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 :-)

What You Will Need

Hardware:

  • Brother KH940 knitting machine. KH930 might work but is untested.

  • USB FTDI cable connected to the machine.

Software:

  • A Python (2.7) installation.

  • Preferably a Python virtual environment.

Installation Instructions

Knitty-gritty is distributed as a Python package. Install it via pip:

pip install knitty-gritty

If that completed successfully, you will now have a knitty-gritty executable, ready to do its thing!

Downloading Patterns from the Machine

# First, find your USB cable:
ls /dev/tty.usbserial-*

# Replace the file below with the name you found
# The last parameter `patterns` is the folder where your patterns should be saved
knitty-gritty emulate-folder /dev/tty.usbserial-A7XTW5YZ patterns

If this is the first time you run knitty-gritty, 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 Knitty-gritty by pressing Control-C. The pattern images should appear in the folder you specified.

Now you can modify/add/remove patterns as much as you like. Just drop them in the folder together with the other patterns.

Uploading Patterns

When you’re done with fiddling with the images, you should upload them:

# Replace the TTY-parameter with the cable you found above.
knitty-gritty emulate-folder --no-save /dev/tty.usbserial-A7XTW5YZ patterns

The --no-save argument tells Knitty-gritty to not save any files to the folder on the computer. This is a safeguard against removing/overwriting patterns if anything goes wrong.

To load the patterns on the machine, enter CE, 551, STEP, 1, STEP and wait until it beeps.

Acknowledgements

  • 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.

Metadata

Release files for knitty-gritty 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for knitty-gritty 0.0.2
File Size Uploaded
knitty-gritty-0.0.2.tar.gz 11.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for knitty-gritty 0.0.2
File Interpreter ABI Platform
knitty_gritty-0.0.2-py2-none-any.whl Python 2 none any Details

Total release size: 23.6 kB

Release files / knitty-gritty-0.0.2.tar.gz

Download URL knitty-gritty-0.0.2.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
33549407572fd9dd457f4d04f2af331626105078e243e8b459142f280d713545
BLAKE2b-256 checksum
How to use checksums
2a416b99175912c03639c3c082a4180eee4655f0230ba2e2cbdeeab68f0c5a28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / knitty_gritty-0.0.2-py2-none-any.whl

Download URL knitty_gritty-0.0.2-py2-none-any.whl
Size 12.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
ec6e709b533622a68d58d1a089c7b3f31fc6b3c81f532ad02ab40adf12db03d0
BLAKE2b-256 checksum
How to use checksums
2463bc06a4634934355d13d2922f7653d05faec6c33ac48721d4c47f6754eab6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page