Knitting Machine Adventures

My aunt was given a Toyota KS858 knitting machine and 506 ribber that had been in a friend’s relative’s garage for umpteen years. It came with what seemed to be most of the accessories, but was missing a manual and punchcards. On a visit in the summer I found a copy of the KS858 manual online and we muddled through trying to set it up, neither of us knowing what we were doing. The end result looked like it should work, but we couldn’t get it to knit properly. Continue reading Knitting Machine Adventures

Compile/Build Errors in Arduino 0023 on Ubuntu

For a while now I’ve been getting build errors in Arduino-0023 on Ubuntu, so I took the easy way out and used Arduino-0023 on Windows because it worked. Finally I got around to investigating the issue, and thanks to Google have found a solution.

The error:

In file included from /usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:44:0,
from /usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/delay.h:37,
from /home/hannah/Documents/Software/Arduino_Linux/arduino-0023/hardware/arduino/cores/arduino/wiring_private.h:30,
from /home/hannah/Documents/Software/Arduino_Linux/arduino-0023/hardware/arduino/cores/arduino/WInterrupts.c:34:
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:426:15: error: expected identifier or ‘(’ before ‘double’
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:426:15: error: expected ‘)’ before ‘>=’ token

The solution:

Comment out line 79 of <arduino installation directory>/hardware/arduino/cores/arduino/wiring.h:

//#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) 

An alternative solution wraps the #define round(x)... line with a check for the problematic version of avr-libc:

#if __AVR_LIBC_VERSION__ < 10701UL
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#endif