The experience with the knitic board as a shield on an Arduino Due for connecting the machine knitter KH-940 with a laptop was not very positive. The board is very fragile. Connecting and deconnecting making it needing constant repair.
After the e-textile summercamp a week was spent on making a new board, connecting the ULN2803’s and programming the Teensy 3.1.
The Teensy 3.1 microcontroller has enough pin’s, it is small and cheap.
Because the Teensy is running at another speed, 24Mhz, the delay’s between the Serial command sent from the laptop to the Teensy had to be altered.
With the program code of the older board (already reprogrammed to reduce all unneccessary communications) flashed to the Teensy not only whole tours/lines were not read accurately, also single pixels inside a tour:
The mistakes in communication in red, the red borderline below indicates the mistakes in lines.
The mistakes in lines are removed, but inside the line, there are still mistakes in pixels.
Making delays between Serial asking the laptop for data and receiving the data larger, the picture is received without mistakes.
The board connecting the ULN2803’s with the Teensy had to be adapted too, because the Teensy is working at 3.3V while the sensors of the KH-940 require 5V. This 5V is taken from the KH-940. The Teensy runs on the USB. Also the Teensy is not resetting if Processing is started, like it does witht he Arduino. So the initialize function had to be refined.
The big connector is printed with a 3D printer
The connector with 10 and 8 pins are made from 2 5 pins connectors
The board with 2 extra potmeters to make the analog read run at 3.3V.
The Teensy 3.1
Testing the knitting from the board
Teensy (arduino script):