PTAMM code for NXT robot