Initial commit of stable code used in KNoT for Arduino