Using Python to Program LEGO MINDSTORMS¬Ć Robots: The PyNXC Project


LEGO MINDSTORMS¬Ć NXT (Lego Group, 2006) is a perfect platform for introducing programming concepts, and is generally targeted toward children from age 8-14.¬† The language which ships with the MINDSTORMS¬Ć, called NXTg, is a graphical language based on LabVIEW (Jeff Kodosky, 2010).¬† Although there is much value in graphical languages, such as LabVIEW, a text-based alternative can be targeted at an older audiences and serve as part of a more general introduction to modern computing.¬† Other languages, such as NXC (Not Exactly C) (Hansen, 2010) and PbLua (Hempel, 2010), fit this description.¬† Here we introduce PyNXC, a subset of the Python language which can be used to program the NXT MINDSTORMS¬Ć.¬† We present results using PyNXC, comparisons with other languages, and some challenges and future possible extensions.


Full Text: PDF