User Tools

Site Tools


tutorials:knittingmachine:pythonstart.html

In this section we will download and install the software that emulates a disk drive to the knitting machine. You can run this software on any kind of computer, mac/win/linux

Python code

Now that you have the cable running, its time to download the software. Visit the Adafruit github repository and click on Download to download the source code.

This code is based on Steve Conklin's knitting machine code which is totally awesome but doesn't support pattern insertion. Still, check out his site for a lot of detailed information.

Download the file and unzip it into a directory that is easy for you to get to. For windows, we're going to stick the folder in My Documents in a folder called brother but if you are comfortable with command lines put it where-ever you'd like!

You will need Python installed to run the code. To see if you have Python installed, open up a command line and type in python. If you're running Windows you probably don't have it, so download it from the official Python site. You'll also need PySerial (serial interface for python) from http://sourceforge.net/projects/pyserial/

Open up a command line (windows) or Terminal (mac) or xterm (linux) and cd to the brother directory and then type in ls (or dir if ls doesnt work) to list all the files

Determining the serial port

Now we need to figure out what the name of the FTDI cable is. This process differs a little for Mac, Linux and Windows people.

Under Mac, in the Terminal window, type in ls /dev/cu.* which should give the following responses or so

lscu.jpg

The name we are looking for is /dev/cu.usbserial-XXXX where the X's are going to be unique for each cable. Copy and paste the name into a text file so you'll remember it for later.

For Linux/Unix type ls /dev/ttyUSB* into a terminal window, you should see a device file called something like ttyUSB0

If you are using Windows, go to the Device Manager (From the Start Menu, select Settings→Control Panel. Double click on System and select the Hardware tab. Then click on the Device Manager button)

devicemanager.jpg

/home/ladyada/public_html/wiki/data/pages/tutorials/knittingmachine/pythonstart.html.txt · Last modified: 2016/01/28 18:05 (external edit)