The good folks at Element14 got in touch after they read some of the Raspberry Pi tutorials on this website. They offered to send me some parts for a project, so I decided to start with a networked baby monitor. I’ll post progress as I go!
Textiles are the original digital medium – It’s no coincidence that the Luddites were named for artisans that protested against the mechanization of textile production in 17th century England. Unlike their predecessors, today’s Luddites are associated with a distaste for the virtuality of modern devices. However, with the arrival of affordable 3D printing and the Internet of Things, it’s becoming clear that the technologist need not choose between digital and actual. Machine knitting is a great example of this overlap.
Dieter Kirkwood and I will demonstrate a useful modification (originally exploited by Davi Post and Becky Stern) to the Brother KH-930e knitting machine at ISEA 2015. These devices were originally released in the 1980s, so they are available relatively inexpensively on sites like eBay. The KH-930e features an early digital input capability, meaning that users could purchase patterns to communicate to the device via floppy disk. We will show how to spoof this connection, upload custom patterns, and “print” them into actual knit shapes.
Each workshop participant will get to design and knit their own custom beer koozie. Is there anything more Canadian than that? Space is limited, so
email me or Dieter see this link to reserve your seat today!
Dieter Kirkwood and I are building an OpenKnit this summer with financial support from Columbia College Chicago. OpenKnit is an awesome open-source project with a really generous instigator, so we’ve been emailing back and forth with project leader Gerard in Madrid to get things off the ground. We’ll be converting the BOM for Americans, making design improvements, and having a good time. All the data we generate will be redistributed online.
Fun fact! Gerard initially got a takedown notice for the video above because his project documentation included visible commercial logos. He contested and the video was restored. Fight the power!
This tutorial assumes you’re working on a PC and have no background in digital imaging.
Finding your image
- Open up a web browser like Firefox or Explorer and find a simple, high-contrast image.
- When you find an image you like, right-click it and “save image as”.
- Keep track of where you save. Saving to the Desktop makes things easy to find.
Modifying your image
- Click on the start button in the lower left corner of the computer screen.
- Type in “gimp” and click on the program when it pops up.
- In the menu, navigate to FILE > OPEN and select the image that you downloaded.
- IMAGE > SCALE IMAGE and change the width to 60px.
- Press the number keys to zoom in and out. Try 4 to start.
- COLORS > BRIGHTNESS/CONTRAST and move the sliders until you have almost no greys left in the image.
- COLORS > POSTERIZE and enter 2 for the number of colors.
- Select the paint bucket tool. This will bring up some options in the vertical window on the left. For fill type, select pattern and select one of the dot patterns we discussed in the lecture.
- Fill all black areas with the dark pattern and all white areas with the light pattern.
Saving your image
- FILE > SAVE AS to save a Gimp version of your project.
- Insert a USB thumb drive into the computer.
- FILE > EXPORT and pick JPEG from the drop-down menu.
- Save this file to the thumb drive.
- Make sure to eject the drive safely. Ask for help if you’re not sure how to do this.
- Now go knit!
As requested in the comments, here’s the pattern we used to prevent long floats. I enlarged it for visibility, but you should make it 5×5 when preparing the tile in Photoshop or GIMP.
Back due to popular demand! Dieter Kirkwood and I are running a knitting workshop at the Harold Washington Library Innovation Lab every Tuesday evening in March. Participants can transfer a simple digital image to an 80’s-era knitting machine via img2track software. See workshop calendar to sign up – seats are free but limited.
See the results of the first set of workshops here.
Though a Raspberry Pi can act like a conventional desktop computer, my RPi projects are generally “headless”, in that no monitor, keyboard or mouse are present. This means that we must “harden” the system settings and code to be self-starting and fault-tolerant. Here are the steps I took to ensure that my CTA bus tracker could run indefinitely without user input.
- Set the default user “pi” to automatically log in on power up.
- Follow these instructions to daemonize your script. This allows it to run as a service, which is easier to monitor and restart.
- Install and configure Monit to resurrect the daemon if it dies. A script can die/exit unexpectedly if it encounters an unhandled error. It’s good practice to take care of these errors within the script itself, but I kept getting occasional script exits despite my best efforts. Here’s a nice little python tutorial about exceptions.
- sudo nano /etc/kbd/config and search for BLANK_TIME=30 and POWERDOWN_TIME=30. Change both values to zero (meaning never). This prevents the Pi from falling asleep.
Update: I’ve been chasing bugs for a month, and I’ve finally got 24 hours of up time according to Monit. I think the problem had to do with the python requests module. I added a timeout to each URL request, allowing the loop to continue even if the CTA server is acting up.
Update 2: It also looks like the API will start bouncing requests once you hit a certain number in 24 hours from the same IP.