libnxter  0.1
libnxter - Mindstorms NXT robotics platform library

libnxter is a collection of robot utilities for LEGO Mindstorms NXT robotics kit, written in NXC (Not Excatly C) language. It implements: two wheel drive vehicle, odometer, motor control, sonar, integer matrix algebra, vectors, PID control, low/high pass filters and kalman filter.

It can be directly used on the Mindstorms NXT with a modified firmware flashed.

LEGO Mindstorms NXT is a programmable robotics kit released by Lego. The main component in the kit is a brick-shaped computer called the NXT Intelligent Brick.

NXT Programming

Normally, it's programmed with a visual graphical programming environment called NXT-G v2.0 that comes bundled with the NXT. It uses flowchart like "blocks" to design their program. While the graphical tool is nice for kids to play, grown ups often want to write and fiddle more :). With custom firmware and enviroment, it can be programmed in "standard" procedural language (e.g. NXC language), allowing it to perform bit more interesting projects.

NXT Hardware

It can take input from up to four sensors and control up to three motors, via a modified version of RJ12 cables, very much similar to but incompatible with RJ11 phone cords. It has a 32-bit ARM7TDMI-core Atmel AT91SAM7S256 microcontroller with 256KB of FLASH memory and 64KB of RAM, plus an 8-bit Atmel AVR ATmega48 microcontroller, and bluetooth support.

Mindstorms NXT hardware


libnxter development is blogged in my blog at:


GNU General Public License

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA


Naba Kumar <naba.kumar(@)>


Daniele Benedettelli <danielebenedettelli(@)>