User Tools

Site Tools


tutorials:knittingmachine:insertpatt.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:knittingmachine:insertpatt.html [2010/11/01 21:32]
ladyada
tutorials:knittingmachine:insertpatt.html [2016/01/28 18:05] (current)
Line 7: Line 7:
 The first thing we'll need to do is make the image. The image **must** be 1-bit/​2-color/​monochrome/​black&​white. You need to make sure that whatever image software can save the file in monochrome. A free program on every windows computer that can do this is **MS Paint** - its crummy but it does this stuff kinda well The first thing we'll need to do is make the image. The image **must** be 1-bit/​2-color/​monochrome/​black&​white. You need to make sure that whatever image software can save the file in monochrome. A free program on every windows computer that can do this is **MS Paint** - its crummy but it does this stuff kinda well
  
-A nice thing you can do is zoom in and click pixels+A nice thing you can do is zoom in and click pixels. Remember that stitches in knitting are not square, so you may want to squish your graphic horizontally just a bit before lowering its resolution.
  
 {{  :​tutorials:​knittingmachine:​paintzoom.gif ​ |}} {{  :​tutorials:​knittingmachine:​paintzoom.gif ​ |}}
Line 23: Line 23:
 Write down or otherwise keep track of the pixel dimensions for the next step. Write down or otherwise keep track of the pixel dimensions for the next step.
  
-====== Creating ​new patterns ​====== +====== Creating ​a container pattern ​====== 
-  * Prepare your graphic as a two-color bitmap and note the pixel dimensions. +Our software can't add new patterns to the memory file (we don't understand enough of the format to do so) but it **can** edit existing patternsSo what we'll do is make a blank 'container' ​pattern ​on the knitting machine. ​Then we'll edit the pattern on the computer and re-upload ​the file.
-  ​Remember that stitches in knitting are not square, so you may want to squish your graphic horizontally just a bit before lowering its resolution. +
-  * You're going to then create ​a blank "container" ​pattern ​of the appropriate dimensions using the knitting machine ​control panel. +
-  * Press INPUT (01_press_INPUT.jpg) +
-  * Note the pattern ​number that appears. User-input patterns get assigned a number in ascending order starting at 901. (02_note_pattern_number.jpg) +
-  * Press STEP (03_press_STEP.jpg) +
-  * Enter your pattern'​s width (number of stitches), then press STEP (04_enter_number_of_stitches.jpg) +
-  * The number of available rows in the machine'​s memory will appear ​on the display. Press CE to clear the display. (04_remaining_available_rows_display.jpg) +
-  * Enter the pattern'​s height (number of rows) and press STEP. (05_enter_number_of_rows.jpg) +
-  * Press INPUT once more to exit input mode. +
-  * Repeat for as many patterns as you'd like to create (and for which you have space).+
  
-{{:​tutorials:​knittingmachine:​screen_shot_2010-10-26_at_9.56.07_pm.png|}} +In this step, you're going to create the blank "​container"​ pattern of the appropriate dimensions using the knitting machine control panel. This pattern is going to be 32x32 and will have pattern ID #901 
-{{:​tutorials:​knittingmachine:​screen_shot_2010-10-26_at_9.55.27_pm.png|}} + 
-{{:​tutorials:​knittingmachine:​screen_shot_2010-10-26_at_9.55.40_pm.png|}}+Press INPUT  
 + 
 +{{  :​tutorials:​knittingmachine:​01_press_input.jpg?​500 ​ |}} 
 + 
 +Note the pattern number that appears. User-input patterns get assigned a number in ascending order starting at 901.  
 + 
 +{{  :​tutorials:​knittingmachine:​02_note_pattern_number.jpg?​500 ​ |}} 
 + 
 +Press STEP  
 + 
 +{{  :​tutorials:​knittingmachine:​03_press_step.jpg?​500 ​ |}} 
 + 
 +Enter your pattern'​s width (number of stitches), then press STEP 
 + 
 +{{  :​tutorials:​knittingmachine:​04_enter_number_of_stitches.jpg?​500 ​ |}} 
 + 
 +The number of available rows in the machine'​s memory will appear on the display. Press CE to clear the display. 
 + 
 +{{  :​tutorials:​knittingmachine:​04_remaining_available_rows_display.jpg?​500 ​ |}} 
 + 
 +Enter the pattern'​s height (number of rows) and press STEP. 
 + 
 +{{  :​tutorials:​knittingmachine:​05_enter_number_of_rows.jpg?​500 ​ |}} 
 + 
 +Press INPUT once more to exit input mode. 
 + 
 +Repeat for as many patterns as you'd like to create (and for which you have space). 
 + 
 + 
 +====== Inserting the pattern ====== 
 + 
 +Follow the [[backup.html|backup tutorial]] to transfer the knitting machine memory to your computer 
 + 
 +Now you'll run **insertpattern.py** by typing in **python insertpattern.py img/​file-01.dat PATTERNNUM BMPFILE myfile.dat** which will insert the **BMPFILE** You made in part 1 into the pattern # location **PATTERNNUM** and when done, save the new data file to **myfile.dat** (so you dont overwrite the old file) 
 + 
 +{{  :​tutorials:​knittingmachine:​insertingqr.gif ​ |}} 
 + 
 +If the pattern size doesn'​t match the image size it wont continue 
 + 
 +{{  :​tutorials:​knittingmachine:​wrongsize.gif ​ |}} 
 + 
 +====== Split the file ====== 
 + 
 +Now that we have the **myfile.dat**,​ we'll need to split the file into tracks. This lets the emulator load the files back like it was a diskette. We've included a simple program to do this, its called **splitfile2trakc.py** and you can run it by typing in **splitfile2track.py myfile.dat** it will create two files, **track0.dat** and **track1.dat** 
 + 
 +{{  :​tutorials:​knittingmachine:​screen_shot_2010-10-26_at_9.55.27_pm.png  |}} 
 + 
 +Rename the files 00.dat and 01.dat respectively 
 + 
 +{{  :​tutorials:​knittingmachine:​screen_shot_2010-10-26_at_9.55.40_pm.png  |}} 
 + 
 +And drag them into your **img** folder 
 + 
 +{{  :​tutorials:​knittingmachine:​screen_shot_2010-10-26_at_9.56.07_pm.png  |}} 
 + 
 +Lastly, we'll reupload the files to the knitting machine, see the next tutorial!
  
  
/home/ladyada/public_html/wiki/data/attic/tutorials/knittingmachine/insertpatt.html.1288647155.txt.gz · Last modified: 2016/01/28 18:05 (external edit)